cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Soham567
New Member

Use Radio Button value as an input for the LookUp function

Hi,

 

I am trying to use the value from a radio button, as an input (specifically the column variable) within the LookUp function (inside a label). Would anyone be able to provide any guidance? 

 

Context: I am building a simple test app that shows price for a car. Enter the Brand, Model, and select between Base or Full Package and the label will display a price imported from a linked excel sheet. It works fine, except the label needs to consider either "Base" or "Full package" from the radio button. The code for the label is: LookUp(Table1,Model= Dropdown_Model.Selected.Model,'Full Package')

 

The issue is with the final variable 'Full Package', where I would prefer to keep something like: Text(Radio_Package.Selected.Value). But this just returns "Base" or "Full Package" as the final result in the label box. 

Soham567_0-1645559189614.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Soham567 

You would do this based on the radio selection in your formula:

With(LookUp(Table1,Model= Dropdown_Model.Selected.Model),
    Switch(Radio_Package.Selected.Value,
        "Full Package", 'Full Package',
        "Base", Base
    )
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@Soham567 

You would do this based on the radio selection in your formula:

With(LookUp(Table1,Model= Dropdown_Model.Selected.Model),
    Switch(Radio_Package.Selected.Value,
        "Full Package", 'Full Package',
        "Base", Base
    )
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

It works, Thanks!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,723)