I have a dropdown list built from a SP list and when I make a selection I change the value in a form datacardvalue box which is successful. However, I kickoff several processes from the OnChange of the datacardvalue, but the OnChange is not triggered for some reason. It appears that the string update from the dropdown list does not emulate keystrokes so the OnChange is never triggered. Any help with this would be greatly appreciated.
@bankhbl
Could you move you OnChange code from your Datacard to the OnChange of the Dropdown? Not 100% sure of your entire app logic but this may work?
There seems to be some conflicting variables in your app. If this was my project, I'd add a number of labels each holding a different variable value then play the app and see how they all interact.
Also, you could tidy up some of your code if you like?
// Code refactoring
// OnChange
Set( valSave, DisplayMode.Edit);
UpdateContext(
{
valStart: false,
varListSelect: false,
varAN: false
}
)
// OnSelect
UpdateContext(
{
valStart: false,
varAN: true
}
)
// Default
If(
varAN && varListSelect,
varDropDownItem,
Parent.Default
)
Thanks. I've included two images to go along with the following description.
The application scans and extracts text from magnetic tape labels and uses an AI model to put the text in the right Sharepoint column (the text boxes in the form. Because there are so many different label formats there will be errors, so I built a dropdown list of all text extracted so the user can click on the datacard to update and then select the item in the dropdown which will then change the text in the datacard (this works fine). The issue is that there are two Boolean variables set to control which datacard (each datacard has its own variable) will be updated (red box around Default). The variable varAN is set to true in the OnSelect of the datacard select (this works) and the varListSelect variable is set to true when the item is selected in the list (works). The issue is that when the new text from the dropdown string is inserted in the datacard the OnChange events (Green box) are not triggered which turns on the save edits button and updates the Boolean flag variables to keep same datacard from being updated again when the next datacard is selected for editing.
You'll need to add some relevant code before anyone can help you with this.
WarrenBelz
146,776
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional