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 / How to display text va...
Power Apps
Answered

How to display text values as dropdown in edit form

(0) ShareShare
ReportReport
Posted on by 243

I've field as 0,1,2 

I added a drop down based on the field value i need to display as text

Categories:
I have the same question (0)
  • PranavShroti Profile Picture
    178 on at

    Since you have not shared much info, I would suggest you go through this link first - 

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-drop-down

     

    Regards,

    Pranav

  • SumanKoduri Profile Picture
    243 on at

    I've Status type values as 0,1 and 2 in db

    But in edit form I want to display it as Reg for 1 and 2 for Front load with drop down and also based on db value it needs to display default value 

  • rebeccas Profile Picture
    2,591 on at

    Need a little more detail to help on this but should be a simple if statement on the default of your drop down.

     

    What allows you to select the 0,1,2? Radio button, drop down?

  • SumanKoduri Profile Picture
    243 on at

    I have a field as Type in my table with value 0,1 and 2 like an enum.

    So I added a drop down in my edit form 

    So in Drop down i need to show values as "" for 0, Reg for 1 and Front load for 2

    In default i need to show text based on value in my table like if table value is 2 i need to show front load in drop down and also other values 

     

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @SumanKoduri ,

    Do you want to display text in drop down based on the value of this field?

    Could you tell me

    1)what your data source is?

    2)what data type of this field?

     

    1)If it is number type, try this solution:

    Step1: unlock this field in the form, delete the textinput in this data card, insert a drop down in the data card

    Step2: set the drop down's Items:

     ["","Reg","Front"]

    set the drop down's Default:

    If(ThisItem.fieldname=0,"",ThisItem.fieldname=1,"Reg",ThisItem.fieldname=2,"Front")

    set the datacard's Update:

    If(drop down1.Selected.Value="",0,
     drop down1.Selected.Value="Reg",1,
     drop down1.Selected.Value="Front",2)

    //please replace with the fieldname and drop down name

    Then the drop down will display text based on this field value and update number based on the selected text value.

     

    2)If it is number type in sharepoint list, try this solution:

    Step1: unlock this field in the form, delete the textinput in this data card, insert a drop down in the data card

    Step2: set the drop down's Items:

     

     ["","Reg","Front"]

     

    set the drop down's Default:

     

    If(ThisItem.fieldname.Value=0,"",ThisItem.fieldname.Value=1,"Reg",ThisItem.fieldname.Value=2,"Front")

     

    set the datacard's Update:

     

    If(drop down1.Selected.Value="",{Value:0},
     drop down1.Selected.Value="Reg",{Value:1},
     drop down1.Selected.Value="Front",{Value:2})

     

    //please replace with the fieldname and drop down name

    Then the drop down will display text based on this field value and update number based on the selected text value.

     

     

     

    Best regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 305 Most Valuable Professional

#2
11manish Profile Picture

11manish 212

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard