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 / PowerApp - Patch Error...
Power Apps
Unanswered

PowerApp - Patch Error - CDS Connector - Gov Cloud

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Experts

 

I am getting below error while using Patch for one of our custom entity “Participant Health History”. Inside Patch I am just setting Lookup value for Participant attribute which is contact entity. Attached is error snapshot.

 

Patch('Participant Health Histories', Defaults('Participant Health Histories'), {Participant: LookUp(Participants, Contact=currentParticipant.contactid)})

 

Error - "The Role column in the data source  you are updating expects a 'OptionSetValue' type and you are using a 'OptionSetValue' type"

 

This error comes only when app is opened in edit mode for first time. If cut/paste this formula and reload app, it works fine.

Any pointers will be appreciated.

Errorpng.png
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Sachinbansal ,

     

    To better understand your issue:

    1. Do you meam the lookup Field column name is "Participant", and it looks up form Contact entity, right?

    2. What is currentParticipant?

     

    Maybe you made a mistake about the lookup entity, please try with the following formuals.

    Patch('Participant Health Histories', Defaults('Participant Health Histories'), {Participant: LookUp(Contacts, Contact=currentParticipant.contactid)})
    
    

    Best regards,

    Sik

     

  • Sachin Bansal Profile Picture
    Microsoft Employee on at

    Hi @v-siky-msft 

    Yes, to answer your first question.

    currentParticipant is variable which holds data for selected participant from first screen.

     

    "Participant" is display name for "Contact" entity only. So when you add contact as data source it appears as "Participants" only and same is being used in my Lookup formula.

  • sachinbansal11 Profile Picture
    4 on at

    Any updates?

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
Haque Profile Picture

Haque 103

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
wolenberg_ Profile Picture

wolenberg_ 67 Super User 2026 Season 1

Last 30 days Overall leaderboard