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 / Adding variable to men...
Power Apps
Answered

Adding variable to menu items

(0) ShareShare
ReportReport
Posted on by 302

Hello,

I wish to add variable (varITEM) to the each item line in the dropdown menu list so that, I can set the varITEM to the visibility of other items for them to appear accordingly when any of the item in the dropdown is selected.

Can someone show me around here.

Virikefe22_0-1663337055373.png

 

 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Virikefe22 

    Not entirely clear on what you are asking for, but to make a guess, I believe you are looking for this:

    Filter(
     Table({Value: "..not going to retype from your image.", Lower: 500, Upper: 670, Visible: varItem},
     {....etc....}
     ),
     Visible
    )

    This assumes that varItems is a boolean value.

     

    Beyond that, if the above is not correct, then please be clearer on what you are looking for and what varItem is.

     

    I hope this is helpful for you.

  • Virikefe22 Profile Picture
    302 on at

    Hello @RandyHayes Thanks for your time again. Here is the line of what I'm trying to achieve. (1) is the visible variable set for (2) so that once the values is selected, it should show the corresponding values or else false (don't show)

    Virikefe22_0-1663417034710.png

     

  • cha_cha Profile Picture
    4,932 Moderator on at

    If you just want to show the value being selected, what you can do is this.

     

    cha_cha_1-1663419680500.png

     

    cha_cha_2-1663419893007.png

    "Status Check" & DataCard3.Value

    DataCard3 is the name of your Dropdown control 

  • Virikefe22 Profile Picture
    302 on at

    Thanks @cha_cha Here is more case to consider:

    You see all the underlined in the table values, when selected in (1) DataCardValue3_1, I want each (in the underlined) to show in the Label1 (2) 
    Note: (1) is just a label and it is separate from the text Status Check

    Virikefe22_0-1663421012091.png

     

  • cha_cha Profile Picture
    4,932 Moderator on at

    What is the Control Name of the recipe combo box? I need that so I can provide you the Text Code for your label

    cha_cha_0-1663421606021.png

     

  • Virikefe22 Profile Picture
    302 on at

    I did mentioned it... DataCardValue3_1

  • cha_cha Profile Picture
    4,932 Moderator on at

    Ah, sorry bout that

     

    On your label, replace the text with code. That code will show the value that you have selected from your Recipe Combo Box.

     

    Left(DataCardValue3_1.Selected.Value, Find(":",DataCardValue3_1.Selected.Value) - 1)

     

     

  • cha_cha Profile Picture
    4,932 Moderator on at

    Sorry, I'm a bit sleepy, I gave the wrong code.

     

    Right(DataCardValue3_1.Selected.Value, Len(DataCardValue3_1.Selected.Value) - Find("-",DataCardValue3_1.Selected.Value)- 1)
  • Virikefe22 Profile Picture
    302 on at

    Thanks Bro, it's coming up well but my final question on this is, is there a way to remove the values from the dropdown items so that it only shows the values in "Omo Auto Wash" (see diagram below) but the Lower and Upper values would show in the Label in a bracket only? Because right now, both values are showing in the dropdown and the label at the same time but I want it shown only in the Label and now in the dropdown.

    Virikefe22_0-1663422798114.png

    Virikefe22_1-1663422950476.png

     

  • cha_cha Profile Picture
    4,932 Moderator on at

    Can you give me the code so I can edit it? I'm a bit sleepy and don't want to copy it one by one.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard