Hi,
There are two entities 'Contacts' and 'Appointments', in contacts field i already patched the two text fields, but i want that those two textfields should also patched into a single lookup column of 'Appointment' entity.
I am applying below formula to patch the data from the two textfields to a single lookup column,
If(varCheck=true,Patch(Contacts,Defaults(Contacts),{firstname:TextInput1.Text,lastname:TextInput1_1.Text,jobtitle:TextInput1_2.Text});Patch(Appointments,Defaults(Appointments),{Required:Concatenate(TextInput1.Text,TextInput1_1.Text});SubmitForm(Form3);ResetForm(Form3);
but i am getting the below error:
"the type of this argument(Required) does not match the expected type expected type 'Record'. Found type 'Text' "
Hi @PMishra ,
Check on below thread to see if it could help:
Regards,
Mona
Hi @PMishra
The issue here is that the lookup type column expects a record of a particular schema as per the lookup entity. When you are passing a concatenated string, this is not recognized as a valid input.
Based on the description shared by you, do you mean that you want to create a contact first and then add the same contact in the lookup column based on entered first name and last name?
Assuming that the above is correct, you can update the expressions as:
If(varCheck=true,Set(PatchedData,Patch(Contacts,Defaults(Contacts),{firstname:TextInput1.Text,lastname:TextInput1_1.Text,jobtitle:TextInput1_2.Text}));Patch(Appointments,Defaults(Appointments),{Required:LookUp(Choices(Appointments.Required),contactid =PatchedData.contactid)});SubmitForm(Form3);ResetForm(Form3);
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
278 | |
232 | |
80 | |
37 | |
37 |
User | Count |
---|---|
352 | |
238 | |
125 | |
70 | |
55 |