Hello and happy Monday.
I inserted a Dropdown with an array for items [0, 1, 2, 3, 4, 5]. The user is asked "How many courses are they creating?" and based on the number chosen, that number of rows appear for the user to fill. This works perfectly. The issue that i am finding is that when the form is opened in Sharepoint, the dropdown defaults back to "0".
I have tried updating a variable (named LastComponent) in the OnSelect and OnChange property. The default property shows If(FormMode.New=true, "0", LastComponent). I pulled a Label and had it equal to LastComponent to see the value that comes through and it shows the correct value.
I'm cant figure out where to go from here.
Thank you for your time
What do you want in the dropdown in EditForm and New form. Can you explain further
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi and thank you.
On the new form it should say 0. In the Edit and View forms it should show the saved value. 1-5.
One thing i forgot to mention is that the dropdown is not tied to a Sharepoint or datasource.
Hi @Misa ,
You want to set the Default value of dropdown based on the form mode, right?
Please try this:
If(FormName.Mode=FormMode.New, 0, LastComponent)
Hope this helps.
Good morning and thank you. What i am finding is that when the form is open (for editing or viewing) the dropdown value stays at 0. It does not show the value that was saved.
I used the formula that you suggested and the same thing is happening 😞
Hi @Misa ,
How do you define the LastComponent variable? Which Form are you refer to?
I just find a editable Gallery from your screenshot. Please share more information about your App.
To debug if the issue is from LastComponent variable, please try this code to see if these logic works for your case?
If(FormName.Mode=FormMode.New, 0, 5)
Class of 2020- Season 2
Featuring samples like Return to the Workplace and Emergency Response Applications
We're excited to announce our first cross-community 'Can You Solve These?' challenge!
Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.
Features releasing from October 2020 through March 2021