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 / 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.

I have the same question (0)
  • v-siky-msft Profile Picture
    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

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 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard