web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Convert Dropdown Text ...
Power Apps
Unanswered

Convert Dropdown Text Item to number column in SP

(0) ShareShare
ReportReport
Posted on by 51

Hi everyone,

 

I have the following situation:

- SP List with number column (numcol1)

Form in PowerApps with a dropdown corresponding to numcol1. The user answers a question (Options NA,A,B,C,D) and clicks on the dropdown where he can select (NA,A,B,C,D). I placed this as followed into the item property of the dropdown:

ITEMS:["NA;"A";"B";"C";"D"]

 

Instead of the text presented to the user I want to store numbers in the SP list based on the answers so,

NA in dropdown to no entry in numcol1

A in dropdown to 0 in numcol1

B in dropdown to 1 in numcol1

....

 

If i open the form at a later point through a gallery it is also important that the text options are displayed in correspondence to the stored number, so the user can change his answer.

 

Does anyone have an idea how to realize this?

Working on it for ages now and I can't find the solution, but I fell like it must be fairly simple.

 

Help is much appreciated! 

 

Categories:
I have the same question (0)
  • Verified answer
    PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @barbossa_94 

     

    1. In your App.OnStart property use this code to create a collection:

     

    ClearCollect(colTextValues,Table({Text:"NA",Value:Blank()},{Text:"A",Value:1}))

     You have to add the records for B,C,D...

     

    2. Change the Items property of your DropDown to

    colTextValues

    3. Change the Default property of your DropDown to 

    LookUp(colTextValues,Value = ThisItem.numberCol).Text

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • barbossa_94 Profile Picture
    51 on at

    @PowerRanger legend. worked like a charm.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard