Objective: Button transitions to a new screen and updates a DropDown column (Allowed Values) with one of the available options. I have three buttons on the start screen that have a corresponding Option in the target DropDown Column on another screen.
Below is screen one, with the button that is to navigate to another screen and update a specific dropdown on that screen. The OnSelect Properties are:
NewForm(NCAAccordianForm); Navigate(ScreenNCAAccordian,ScreenTransition.Fade, {SelectedValue: "Individual Tax"})
Below is Screen two with the dropdown that is to be updated. The screen OnVisible properties of the screen is:
UpdateContext({ClientTypeValue: Param("SelectedValue")})
The Default value of the Client Type column is: ClientTypeValue. The value remains blank even though the contextual variable was pushed through to the new screen.
Is this the wrong approach?
@LaurensM that worked perfectly! Thank you so much!
Hi @ShondaT,
The comment of @madlad regarding Param is correct. Additionally, the UpdateContext on the Screen Onvisible is not needed since the Navigate function creates a context variable called SelectedValue.
Please try the following code in the DefaultSelectedItems property of that Combobox:
{Value: SelectedValue}
In case of a custom dropdown which does not have the DefaultSelectedItems property, use the following code in the Default property:
SelectedValue
Make sure the saved text value matches the dropdown options exactly - pay close attention to spaces and capitalization.
If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.
Thanks!
@madlad The values are: Individual Tax, Entity Tax, Assurance and it is a SharePoint Text Column that I changed to a dropdown within Powerapps by applying Assigned Values.
What type of values are the dropdown's choices, and how are they defined in the dropdown?
You may need to use some formula to find this, as it looks like just using the variable isn't finding a match in the dropdown's choices.
Let me know!
@madlad Thank you for your suggestion. That doesn't appear to work either. If there's another approach you could suggest I'm definitely all ears. 🙂
Hi!
I think here you should be able to just change the Default value of the client type to be SelectedValue, since SelectedValue is a context variable for this screen - If you want to keep using ClientTypeValue, try changing the reference in the OnVisible to be:
UpdateContext({ClientTypeValue: SelectedValue})
I believe the Param Function gets values from when the app is launched, not when the screen changes.
Hope this helps!
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,957
Most Valuable Professional