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 / Formual to dynamically...
Power Apps
Answered

Formual to dynamically get the static Items inside a Radio button and check if a value is inside them

(0) ShareShare
ReportReport
Posted on by 3,514

I have the following card, which contain a Radio button with static Items representing amounts [5,10,15,20,25], as follow:-

 

amount.png

 

 

 

so is there a function that i can use inside my formula to dynamically get those static values and be able to search them? something such as;

 

Filter(Radio1.Items, Value= "10");

 

Thanks

 

 

Categories:
  • Verified answer
    PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @johnjohn123 Not sure if I really understood your requirements. 

     

    If this is what you are looking for:

     

    1. Create a collection

    ClearCollect(colRadioOption,["1","2","3","4","5"])

     

    2. For the Items Property of your Radio Control use:

    Filter(colRadioOption,Value(Value) > 3)

     

    Does this goes into the right direction?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • johnjohn123 Profile Picture
    3,514 on at

    @PowerRanger  i need to dynamically get the Items choices 5,10,15,20,25 I do not want to define/hard-code them again

     

    something similar to this formual

     

    Filter(Radio1.Items, Value= "10");

     

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @johnjohn123 what do you mean by "dynamically" get them. So either you hardcode them in PowerApps or have them available in some other datasource or you need to define a "logic" of how to create a table with the desired values.

  • johnjohn123 Profile Picture
    3,514 on at

    @PowerRanger  by dynamically i mean, those 3 points, please let me know where you fail to understand them:-

     

    1) I have created a Radio button with static items, as shown in the picture i posted --> is this clear?

     

    2) now on the App OnStart i need to get/query SharePoint list item based on the ID >> and get its Amount field value --> is this clear?

     

    3) finally i want to dynamically query the Items inside my Radio1 (which are 5,10,15,20,25) and check if the Amount is inside those values or not---> is this clear/possible?

     

    in other word, let say in the future we need to add additional cost Item inside the Radio let say 30.. so we will only have to add this inside the Items property of the Radio1.. and since all the formulas will be dynamically getting those items,,, so they should keep working without having to modify them each time we add a new static Item inside the Radio''s Items property

     

    does this formula gives you any clue Filter(Radio1.Items, ThisItem.Amount); about what i am asking for? dynamically means getting the 5,10,15,20,25 using something similar to Radio1.Items

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @johnjohn123 you actually lost me on No.2

     

    Lets try to clarify this.

     

    What ID are are you refering to. The ID of the SharePoint Item loaded in your Form? 

  • johnjohn123 Profile Picture
    3,514 on at

    @PowerRanger  yes.. you are concerned about the ID.. i just give it as an example.. you can ignore it...

     

    Did you get what i am looking for? something that looks simialr to this Filter(Radio1.Items, Value = ThisItem.Amount) ?? or you are still confused?

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @johnjohn123 I am still confused 😁. Is this describing what you are looking for.

     

    1. Your Form is showing an item. This item has a column named amount. The value is 10

     

    2. You have a Radio Button with items as described 10,15,20,25....

     

    3. When the App loads (I assume it is a custom sharepoint Form) you want to select the Radio Option which reflects the value the column amount

     

    Is that right? 

  • johnjohn123 Profile Picture
    3,514 on at

    @PowerRanger  No Ranger!! simply i want to write a formula to check if the ThisItem.Amount is inside the Radio1 Items ???

     

    Let say the ThisItem.Amount = 30 and the Radio1.Items = [5,10,15,20,25].. then my formula should return false!! but i do not want to hard-code [5,10,15,20,25] values inside my formula, i want to dynamically get them from the Radio1's Items property.. i think now this should be clear to you on what i am searching for?

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @johnjohn123 I got it....almost. The only thing which is yet not clear is where the Radio options will come from. So something must be in the items property. Currently you have it hardcoded like [5,10,15,20,25]. But you need to define something in Items!!

     

    You can't get the items defined for a radio button. But when you know the source which is used for Items you can do all your checks based on the source. I really don't get the point about this radio button.

     

    So what will be the DataSource of your radio button?

  • johnjohn123 Profile Picture
    3,514 on at

    @PowerRangeryou got my point.. for your question "where the items comes from"? are from the finance dept.. but we do not want to define the source of this Radio1 to be the SharePoint choice field, because this field allow fill-in and if we source the Radio1 Items from SharePoint then we will get the choices that have been filled-in which we do not want.. so are you saying that getting the static Items for the Radio1 is not possible?and the only way to reference them, is to hard coding them again and again inside each formula which reference them?

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard