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 / Update Data Card with ...
Power Apps
Answered

Update Data Card with variable

(0) ShareShare
ReportReport
Posted on by 27

Power Apps Newbie here🙄, I appreciate your help.

 

My data card is connected to a field called IsManual that will accept N/A, Yes, or No. I want to use one of three buttons that function like option buttons instead of a dropdown list. 

 

The data source is a SharePoint list with items from a variable with defaults, e.g., Set(varFormData, Defaults('My List')). All my other screens with regular data cards work fine.

 

clight_0-1677274535282.png

 

Screen OnVisible = Set(varButtonValue1,"")

btnNA OnSelect= If(varButtonValue1 = "N/A", Set(varButtonValue1,""), Set(varButtonValue1,"N/A"))

btnYes OnSelect= If(varButtonValue1 = "Yes", Set(varButtonValue1,""), Set(varButtonValue1,"Yes"))

btnNo OnSelect= If(varButtonValue1 = "No", Set(varButtonValue1,""), Set(varButtonValue1,"No"))

All the above work fine. The correct value is stored in the varButtonValue1 variable.

 

How do I update the data card (connected to varFormData) to accept varButtonValue1 as the value for the field IsManual? I am  patching to SharePoint later in the app.

 

I get an error when I put varButtonValue1 in the data card Updates box.

clight_0-1677275958897.png

 

 

I get an error with varButtonValue1 in the dropdown list, which I was going to hide and use as the Update property on data card.

clight_1-1677275483759.png

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @clight ,

    Just use one code on the three OnSelect

    UpdateContext({varButton1: Self.Text})

    At Screen OnVisible

    UpdateContext({varButton1: ThisItem.IsManual.Value})

    then the Update of the Data Card (assuming you are writing back to a Single Choice field)

    {Value: varButton1}

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • clight Profile Picture
    27 on at

    @WarrenBelz  Worked like a charm!  Thank You😀

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard