Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Switch data in forms for user selection

(0) ShareShare
ReportReport
Posted on by

Hello all,

 

Here I meet a problem.

 

I insert the form in power apps and connect to the excel online raw data.

For a column named size, I hope the user can select between A3, A4, B4, B5, 8K, 16K and so on. But in my raw data, I only have sheet width and sheet length.

I have use the distinct function in items, that is, 

Distinct(Filter(Table2Data,Description=DataCardValue3.Selected.Value && 'GSM  '=DataCardValue4.Selected.Value),'Sheet width')
 
After applying the function above, the user can select between 297, 210,195 and so on.
So what I need is to switch 297, 210, 195 to A3, A4, 16K...
 
I tried to use the function in onselect, that is,
 
Switch(DataCardValue5.Selected.Value,
"297","A3",
"210","A4",
"420","A3",
"182","B5",
"195","16K",
"257","B4",
"270","8K",
"216","Letter Size")
 
But it seems not work.
 
Hope you can help me solve the problem.
Thanks!
  • v-mengmli-msft Profile Picture
    on at
    Re: Switch data in forms for user selection

    Hi @Yiqian ,

     

    Do you want to make the drop-down options more accurate?

    If so, it should be in Items property.

     

    Best regards,

    Rimmon

  • YC-24070300-0 Profile Picture
    on at
    Re: Switch data in forms for user selection

    Hello,

     

    Thanks for your reply.

    But I still have one more question that where should I put this function in this dropdown list?

    Distinct(Filter(Table2Data,Description=DataCardValue3.Selected.Value && 'GSM  '=DataCardValue4.Selected.Value),'Sheet width')

     

    Since I need to filter size first to make the choice more accurate, this may be somewhat difficult.

     

    Thanks!

  • v-mengmli-msft Profile Picture
    on at
    Re: Switch data in forms for user selection

    Hi @Yiqian ,

     

    Your current Switch returns a text, you should put it on control which is used to show paper size.

    If you are using drop down for paper size, please try this.

    Items of Dropdown.

    ["A3","A4","B5","16K","B4","8K","Letter Size"]

    Default of Dropdown.

    Switch(DataCardValue5.Selected.Value,
    "297","A3",
    "210","A4",
    "420","A3",
    "182","B5",
    "195","16K",
    "257","B4",
    "270","8K",
    "216","Letter Size")

     

     

    Best regards,

    Rimmon

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard