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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 538

#2
WarrenBelz Profile Picture

WarrenBelz 420 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard