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.
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?
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
15 | |
4 | |
4 | |
3 | |
3 |