web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching Choice Column
Power Apps
Unanswered

Patching Choice Column

(1) ShareShare
ReportReport
Posted on by 41
Attempting to patch to a true/ false Dataverse Choice column 
 
Patch(
    Tickets,
    LookUp(Tickets, Ticket_Owner = ThisItem.Value && Status = 0),
    statecode: Value: }}
)
 
Error Message: The type of this argument statecode does not match the excepted OptionSetValue (Status (Tickets)) Found Type Record
The Status column is Choice with 'Active' 0 and 'Inactive' 1 choices
 
I've attempted to use UpdateIf also and receive similar error.
UpdateIf(
Tickets,
Ticket_Owner = ThisItem.Value && Status = 0,
{ statecode: { Value: "Active" }}
)
 
Have also attempted to use decimal 0 and text but no luck, ideas?
Categories:
I have the same question (0)
  • MF-11091236-0 Profile Picture
    41 on at
    the dataverse column definition
     
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    Can you try updating your first option to the below:
    Patch(
        Tickets,
        LookUp(Tickets, Ticket_Owner = ThisItem.Value && Status = "Active"),
        { statecode: { Value: "Active" }}
    )
     
    Hope this helps. 
     
    Kind regards,
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
  • Suggested answer
    MF-11091236-0 Profile Picture
    41 on at
    Still working on solution
  • Suggested answer
    MF-11091236-0 Profile Picture
    41 on at
    was able to get working by using the following code and enabling delegation for UpdateIf and RemoveIf within Settings/ Experimental.   The key was looking up the value defined within Tickets.Status.
     
        UpdateIf( Tickets,
            Ticket_Owner = ThisItem.Value
                And Redeemed_Date = Blank()
                And Status = LookUp(Choices(Tickets.Status), Value = 0).Value,
                Status: LookUp(Choices(Tickets.Status), Value = 1).Value }
        )

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard