cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Distinct expression on Choice column powerapps form

Hello Team,

 

I have a choice type column in my Powerapps form . In order to have distinct values I have tried a formula :

RenameColumns(Distinct(Choices(@Request).CompanyCode),Value),"Result","Value")

but when I submit form the the dropdown gets Reset .

 on the Update of the DataCard  i have DataCardValue22.Selected where DataCardValue22 is dropdown .

 

Can some one help me on this ?

 

7 REPLIES 7
Jeff_Thorpe
Super User
Super User

Your formula looks correct. I tried this on a test form and it worked as expected. What do you mean by "when I submit form the the dropdown gets Reset"?  Are you staying on the form after you save it and the value is changing? Does the value get saved correctly to SharePoint?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
v-qiaqi-msft
Community Support
Community Support

Hi @Anonymous,

Could you please tell me that if the dropdown not displaying the selected value or not saved to SP list?

Do you want the dropdown to display the selected value after you submit the form?

 

Actually, if you want to keep the dropdown selected value after you submit the form, you should set the Item property of the form as the last submit record. Then you should assign the dropdown box with the last selected value.

 

Please provide more details if this could not solve your problem.

Best Regards,
Qi
Anonymous
Not applicable

When I submit the form the value is not getting Saved to my SP list 

Hi @Anonymous,

Could you please tell me if the column you want to save the selected value to is a Choice column in the SP list?

Does it allow single select or multi select?

 

I have tested that a single select choice column could be updated using the formula you provided.

Best Regards,
Qi
Anonymous
Not applicable

Its choice column in SP and the choices are from another list .Its a single select

Hi @Anonymous,

Could you please give all the details about the column in another list? If it is a Choice column in that list?

The formula you provided works only when you have a choice column from another list and save this selected value to the choice column in the current list.

If the choices are from a Text column in another list, the formula should be different.

Best Regards,
Qi
Jeff_Thorpe
Super User
Super User

@Anonymous , is the SP Column type Choice or Lookup? I ask because you mention "the choices are from another list" which usually indicates that it is a Lookup column and not a Choice. If it is a Lookup column then the issue makes sense because when you save a value to a lookup column you need to include the ID of the value. 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,202)