Hi ,
I am having a drop down with 4 choice values A,B,C,D. Based upon the value selected for Eg; D, a section will appear below.
My requirement is
so for this requirement i want to save the previous selected value of dropdown to compare with the latest selected value in order to do the refresh.
please provide your suggestions or any other idea to do this requirement.
Thanks in advance
Pradeep.B
Discussion posts and replies are publicly visible
The above posted code will work (though i'm unclear what "should be refreshed" really implies from your initial requirement description); however I'd personally recommend simplifying if possible and just using stacked saveIntos to save a single "last value" historical copy whenever the dropdown is changed. You can then (i assume) store your logic for the "refresh" condition in a subsequent local variable, which will refresh anytime either of the earlier values gets changed.
a!localVariables( local!values: { "A", "B", "C", "D" }, local!currentSelection, local!oldSelection, local!isRefresh: if( isnull(local!oldSelection), "", "" /* put refresh logic here */ ), { a!dropdownField( label: "Dropdown", choiceLabels: local!values, choiceValues: local!values, placeholder: "--select a value--", value: local!currentSelection, saveInto: { a!save( local!oldSelection, local!currentSelection ), a!save( local!currentSelection, save!value ) } ) } )
thank u Mike Schmitt