I have an autocomplete based on an associated property. In addition I also show and set another property. The values are sourced from a data page. When I type in the autocomplete and it displays choices and I select one of those choices only the associated property gets set, not any of the other additional properties. I have an onchange on the autocomplete to refresh the section. This only works if I select a choice in the autocomplete dropdown where the associated property is a different value than previously selected even if the other properties shown are different. How do I get the autocomplete to set the additional properties in this case?
This only works if I select a choice in the autocomplete dropdown where the associated property is a different value than previously selected even if the other properties shown are different. How do I get the autocomplete to set the additional properties in this case?
Could you please explain this, didn't get your exact scenerio
I have attached a screenshot. providername is the associated property.. In addition I am displaying providerid and setting it when a selection in the autocomplete is made. So I am displaying providername and providerid but providername is the associated property. If I make a selection where providername is the same as previously selected but with a different provider id then it does not update the providerid when selected. Even the onchange action on the autocomplete does not seem to get fired. I'm assuming its because the associated property is not changing, only providerid is actually changing.
I have configured in the same way and its working for me. I have checked reload once per interaction for data page load management. If that is not possible , have a data transform on actions to load the data page again if the provider ID is different . Please refer the attached screenshots.
OK so when you get the auto complete and you have two selection in the auto complete with each one having the same CountryCode but with each one having a different CountryNo and you select one and then the second time you select the other one then the CountryNo is set and onchange is called for the second time around?
Do you have 1:N relation between what you are showing and setting on selection? showing the same value multiple times in autocomplete and selecting it for the second time and expecting to set the other values based on new selection?
If so, since the DOM element value hasn't changed logically for the second time, I guess there is no OnChange event trigger and leaving with previous values.
Can you try with setting unique value on autocomplete onchange and categorize records based on the property that has the same value.
That's what I thought. The onchange won't fire because basically the value of the associated property hasn't changed even though the value of the second property has changed which is supposed to be being set by the autocomplete but isn't. if this is the way it was intended to always work by not being able to set the second property until submit then it would seem to me that I would need to reverse the properties because unlike the associated property the second property is unique. Its just that our customer would prefer to search using the auto complete by the first property instead.
The first property (Associated property) is "provider name" for example. The other second property is "provider id". Provider id is unique but provider name is not unique unfortunately. So when they select the provider name along with the provider id that I am displaying the provider name gets set but the provider id does not get set. I have read its because it hasn't been submitted yet and a refresh has not been done. It sounds like I can't catch on change of the provider name if the provider name was the same as previously selected which means I can't refresh either.
If you prefer to show all the properties, you can have a property set with required properties on Data page's postprocessing DT and show it by selecting "Show" option on "Search Results Configuration".
" Its just that our customer would prefer to search using the auto complete by the first property instead. "
You may need to check if you can categorize the results based on the property which has the same value in conjunction with configuring other property as "Use For Search" setting the unique property on change.
I believe I have a solution to my problem. I use a different associated property that is a merge of the old associated property and the second property. In the post processing step of the data page I merge the properties in the code-pega-list.