cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DuncanIVH
Helper I
Helper I

Dropdown - set default value from table

I have a dropdown list which has its Items property set as:

 

Table(
{ Text: "", Val: Blank()},
{ Text: "Ground", Val: 0},
{ Text: "1st Floor", Val: 1},
{ Text: "2nd Floor", Val: 2},
{ Text: "3rd Floor", Val: 3}
)

 

I need to preset the Default value so I'm using

varCurrentRecord.FloorLevel

 

the FloorLevel is correctly coming in as the value 1, but the '1st Floor' item is not being set as the default.

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @DuncanIVH,

Do you want to match the FloorLevel with the Value in the table so that we could retrieve the Text value from the table?

 

If so, please set the Default property of the dropdown as below:

LookUp(Table(
{ Text: "", Val: Blank()},
{ Text: "Ground", Val: 0},
{ Text: "1st Floor", Val: 1},
{ Text: "2nd Floor", Val: 2},
{ Text: "3rd Floor", Val: 3}
),Val=varCurrentRecord.FloorLevel,Text)
Best Regards,
Qi

View solution in original post

1 REPLY 1
v-qiaqi-msft
Community Support
Community Support

Hi @DuncanIVH,

Do you want to match the FloorLevel with the Value in the table so that we could retrieve the Text value from the table?

 

If so, please set the Default property of the dropdown as below:

LookUp(Table(
{ Text: "", Val: Blank()},
{ Text: "Ground", Val: 0},
{ Text: "1st Floor", Val: 1},
{ Text: "2nd Floor", Val: 2},
{ Text: "3rd Floor", Val: 3}
),Val=varCurrentRecord.FloorLevel,Text)
Best Regards,
Qi

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (4,422)