cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sachinbansal
Microsoft
Microsoft

PowerApp - Patch Error - CDS Connector - Gov Cloud

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.

3 REPLIES 3
v-siky-msft
Community Support
Community Support

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

 

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.

Any updates?

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (76,302)