Alternative module to Select (or Other) in Drupal 8 - drupal-8

Select (or other) has a demerit that when you add something other than the given options, the new option which you have written in text box, gets added in the list. So when next time when you see the drop down, the option which you added previously is now showing in the drop down list.
Here is detailed description:
When i add "Stack Overflow" in the text box of other option.
Now you will see this option in the list:
I have gone through the issues related to the "Select (or other) module and found out that this is the issue of this module"
What can be solution to this failure of this module?

CCK Selct Other can be a better option to avoid this problem, but in my case i have one additional requirement.
I wanted "Other" field should be hidden until the user selects "Other" option. But in CCK it is always open. So instaed i used Conditional Fields Module.

Related

Power Apps :I need onstart action for datacardvalue. How to implement it differently?

I need to use the value of a datacard for checking if it matches a global variable.
The problem is that the only actions that I can use is onselect (but the item is a card only for reading and can not be selected or edited) and onchange. So I used the second option (at least that works) but not if I click for first time. I need to first open another request to read and then select again the one that I need to change the field and enable the onchange action code I have written.
Is there any way to set like a value that is not appropriate and that it will change inevitably when I open the request for reading on first attempt? Setting a default value is not possible either as it has errors.
I just added the code after ; on the "on select" field of the button that navigated me on the reading the request page. So the global variable was set before actually opening the request to read.

Popup LOV item settings

Is it possible to disable Popup LOV item search bar and load by default all rows from SQL Query? Item has an JavaScript Initialization Code block, but I can find documentation how use it (for example like Rich Text Editor or Charts). For now I disabled Popup LOV search bar using CSS, but maybe there is another way?
There is no way to disable the search bar declaratively.
The CSS way is indeed your best bet.
Concerning the JavaScript Initialization Code attribute, the first thing I always do before putting anything in there is the following:
function(options){
console.log(options);
return options;
}
then checking the console. Usually you will see all of the declarative values and defaults for any other fancy things.
Your second option would be to check the actual source code, which usually includes some JSDoc. In the case of the Popup LOV, you want to look at this file. Of course the easiest way to get to these things is to put your app in debug mode, and navigate through the files in the Sources Panel.

CListCtrl search by typing: how to show what's been typed?

I have a CListCtrl in Report view, and I noticed that I can search by typing the first few letters of an item (the control selects the first item that matches as I type), and that this search "resets" after a second or so (so if I've typed "abc", pause, then type "d", then it searches for "d" only). For usability, I want the user to realize that this search-by-typing feature exists.
So here are the options I can think of, in order of preference, and the question I have in each case:
Use whatever existing built-in support there is in MFC.
Is there such a thing?
Some other solution that's been implemented before.
Again, is there such a thing?
Add another textbox to the dialog box, and handle its ON_EN_CHANGE message to somehow trigger CListCtrl's search behavior. In other words, similar to the find dialog/toolbar in browsers.
How do I trigger the search behavior?
Did take a look into the List-View controls documentation on Microsoft Docs.
This behavior is described in the Default List-View Message Processing (WM_CHAR message). The search-string is indeed reset after one second.
However, I didn't find any notification message that seems to be relative, eg returning the current search-string, which you can display. There is the
LVN_INCREMENTALSEARCH, but the documentation is rather confusing (eg what is an "incremental search"? etc), and I don't know if you are going to receive this at all, as this seems to be about Virtual List-View controls. Anyway, you can give it a try.
But resetting the test entered by the user in just 1 sec may rather be unwelcome to users or reviewers (actually I have never seen an application doing so). So you can implement some "Search" operation in your dialog, as you said add an edit box and search for its content. You can use the LVM_FINDITEM message (or the ListView_FindItem() macro) requesting a partial-match search (LVFI_PARTIAL), or do the search yourself (find the matching item and move there).

Sitecore Insert options not working

I'm fairly new to sitecore and having lots of trouble. I found a couple of articles that show how to add items to the insert context menu of a template, and I was able to get it to work once, on one of my templates. It worked off of the root of the template. But this root has branches under, and when I try to set the insert options for those branches, it does not work.
I did not build this site so I am not sure what is happening.
Is it possible there is some security setting somewhere keeping it from working? Or could it be that they are not linking to individual module items, but perhaps a menu somewhere, and that maybe it is that menu that I need to update?
To make matters worse, I am not sure where I should be assigning these insert options. The articles I've read say to do it on the _standardvalues of the template, but under branches I see the template of the same name and it actually has the branch structure underneath, which is where I actually want the insert to be (under Column 5). I've attached a screenshot if it helps.
http://www.accriva.com/tree.JPG
The insert options for a template are always set on the _standard values of that template.
Branches are not templates. Branches use templates to define a common content structure which content editors need to re create often and therefore it saves the editors time.
To add insert options to your Column template. Either navigate to the template if you know where it is or click on the column 5 node in your branch, look at the quick info section of the item. There you will find a link to the items template. Click on the template link, the template should open. In the left hand menu expand the template so that you can see the __standard values. If you have no standard values then create them. Click on __standard values then select configure in the sitecore ribbon (top menu). Now click on assign within the insert options section and select the templates you wish this template to have as insert options.
Now your column template will have the insert options set correctly. If you dont see them then go back to your column 5 node in your branch, you may have overridden the standard value settings and hence wont see the correct insert options. To ensure your getting the correct insert options from your template, select the column 5 node then in the ribbon click on configure then reset within the insert options section this will reset your insert options to that set in the standard values of your template.
Now if you still don't see the insert option changes that you have made then go back to the column template, select its standard values. Click on assign in the insert options section of the configure tab. In the insert options pop up, look to your left. You will see an option to select insert rules. Click on that and check if you have any insert rules for this template. If you do then find the insert rule item under system/settings/insert rules. Once you have found it select the rule and it will contain a reference to a class within your solution. Use that reference to find the class in your solution and debug that logic, it may be enforcing insert options programmatically.

How can you edit Sitecore desktop shortcuts?

Anyone know how to edit the name of the Sitecore desktop shortcuts? I'm using the Advanced System Reporter module, and creating a desktop shortcut from there, but now I can't change the name of the item.
I know that you can right click on the Sitecore desktop shortcut and choose properties so change the information of the link....but how can I change the name of the shortcut?
The properties have a field 'Name', that even when I change it, the shortcut doesn't change (even after a desktop refresh).
I tried changing the 'Link' field on the properties as well, but then the link disappeared.
Do these exist in the core database somewhere? Can I get back the one that I just lost (by changing the Link field)?
Through further research, I found that for normal links, the name can be edited by right clicking the link, selecting 'Properties' and changing the 'Name' field.
Unfortunately, Links generated through the Advanced System Reporter don't update on the desktop when this Name property is changed.
It seems that the links for these desktop shortcuts are a combination of items in the core database and values in the User profile in the aspnet_profile DB table (also in core, but only viewable through SQL).
This value is stored in the PropertyValueBinary field, which, as the name suggests, is all in binary, and can't (or shouldn't) be edited.
One way around this is to:-
Create the desktop link, which will be called something by default (i.e 'SalesReport').
Open up the core database in Sitecore, and navigate to /sitecore/content/Applications/Advanced System Reporter/Links. Then find the folder for your username.
Find the item that was created for the link (in this case it'll be 'SalesReport'), and change the value of the field 'Display name' to whatever you want the link called (i.e 'Sales Report for May'.
Note: You may want to change the name of the item as well, so that it won't get lost in other desktop links created in the future and will be easier to find later. In this case you will need to:-
Go back to the desktop, right click the shortcut and choose Properties.
Manually change the end of the 'Link' field to the name you want to call the item (i.e change it from 'SalesReport' to 'Sales Report for May'.)
When you click OK, the shortcut will disappear. This is expected.
Open up the core database in Sitecore again, and find the item you're changing. (i.e /sitecore/content/Applications/Advanced System Reporter/Links/SalesReport
Change the name to exactly what you changed it to in step 2.
The link will reappear on the desktop, it'll have the correct name, and will be easy to locate in the Sitecore DB in the future.