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 / Patching Radio Buttons
Power Apps
Answered

Patching Radio Buttons

(0) ShareShare
ReportReport
Posted on by 239

Hi, 

 

I have a Travel Reimbursement app that I am working on and am having a hard time getting the meals patch to work. 

I keep getting the error "Expected Boolean"

I am trying to have the cost column value update based on what is selected. 

 

 

 

If(MealOpt.Selected.Value = "Breakfast: 6AM-8AM", Patch('TR Expenses', LookUp('TR Expenses', TravelID),{Cost: "$6.00",}),
MealOpt.Selected.Value = "Lunch: Noon-2PM", Patch('TR Expenses', LookUp('TR Expenses', TravelID),{Cost: "$11.00",}), 
MealOpt.Selected.Value = "Dinner: 6PM-8PM", Patch('TR Expenses', LookUp('TR Expenses', TravelID),{Cost: "$19.00",}), 
MealOpt.Selected.Value = "All 3 Meals: 6AM-8PM", Patch('TR Expenses', LookUp('TR Expenses', TravelID),{Cost: "$36.00",}) 
)

 

 

 

 

Thank you

I have the same question (0)
  • AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @gfeldhake, What is the formula that you are using in the Lookup function to update records? 

    LookUp('TR Expenses', TravelID=?),{Cost: "$6.00",}) 

     

    Or you are trying to create new Records? You will have to use the Defaults function in the Patch to create new records.

     

     

     

     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

  • GF-02121351-0 Profile Picture
    239 on at

    I was trying to make sure that the Meal amount would be tied to the current TravelID. To be honest I Googled how to do this Patch and the I was the code had the Lookup. 

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @gfeldhake, Where are you listing the Current TravelID in the Canvas App? Are you using a Gallery? 

  • GF-02121351-0 Profile Picture
    239 on at

    It is created on the first screen, and yes, I have a gallery. 

     

    Here is my gallery setup: 

    Component Three.png

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @gfeldhake, then your Lookup should be something like this:

    LookUp('TR Expenses', TravelID=Gallery.Selected.TravelID),{Cost: "$6.00",}) 

    Make sure to select a record in the Gallery before you run the Patch formula.

     

     

     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

  • GF-02121351-0 Profile Picture
    239 on at

    I think that will work. 

     

    I did get this error when I made the change: 

    Type Error.png

    crae8_cost is set as a decimal in my Dataverse table. 

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @gfeldhake, use the numbers in your Patch functions without double quotations and without dollar sign $. 

     

     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

  • GF-02121351-0 Profile Picture
    239 on at

    I am starting to wonder if I need to start over and research Radio buttons and If statements more.

    I am now getting invalid argument type Boolean. Expecting a record value instead. 

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @gfeldhake , are you saving those values in a a column using Choices in Dataverse?Lunch: Noon-2PM

     

     

  • GF-02121351-0 Profile Picture
    239 on at

    No, only the amount we pay out (cost) when travel occurs during that time. On a different screen they input their start and end time. 

     

    Do you think I should? 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard