cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate V
Advocate V

Custom dropdown value not sticking

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.

CSSD.PNG

I'm cant figure out where to go from here.

 

Thank you for your time

5 REPLIES 5
Highlighted
Super User
Super User

Re: Custom dropdown value not sticking

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.

Highlighted
Advocate V
Advocate V

Re: Custom dropdown value not sticking

@eka24 

 

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.

Highlighted
Community Support
Community Support

Re: Custom dropdown value not sticking

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.

Sik

Highlighted
Advocate V
Advocate V

Re: Custom dropdown value not sticking

@v-siky-msft 

 

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 😞

Highlighted
Community Support
Community Support

Re: Custom dropdown value not sticking

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)

Sik

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,672)