Hi Members,
I have a requirement in PowerApps: I need to save the Power Apps form details to the SharePoint list.
I have a SharePoint list [Product Issue Details] with columns like:
- Issue - Single line of text
- Issue Description - Multiple lines of text
- Issue Product - Lookup column from another sp list [ACGH Products]
- Issue Product Category - Lookup column
- Issue Priority - Choice ["High", "Low", "Medium"]
- Issue Image - Image
- Issue Due Date - Date column
- Issue Handled By - Lookup column from another sp list [Product Employee List]
- Issue Raised By - Single line of text
- Issue Raised By Email - Single line of text
- Issue Status - Choice

The Power Apps form looks like:

In Power Apps, I have added an edit form with specific columns only:
- Issue - Single line of text
- Issue Description - Multiple lines of text
- Issue Product - Lookup column from another sp list [ACGH Products]
- Issue Product Category - Lookup column
- Issue Priority - Choice ["High", "Low", "Medium"]
- Issue Image - Image
Issue Product Category field will display the text based on the issue product. Now, I need to submit the form details to sharepoint list and also I need to save the other 4 field details also like:
- Issue Due Date field - This field date should be saved from the powerapps form only; The date should be captured from the Issue priority field; if the user selects "High" priority, the issue due date should be saved by adding 1 day, If the user selects "Medium", the issue due date will be adding 3days and for "low," 5days. So, I have tried the formula:
DateAdd(Today(),If(Radio2.Selected.Value=Blank(),"",If(Radio2.Selected.Value="High",1,If(Radio2.Selected.Value="Low",5,3))),TimeUnit.Days)
2. Issue Handled By = This field value should be saved from the powerapps form only, The value should save from Issue Product Category field, when this field displayed "Home," the item should save as "Henrietta Mueller", if it is "Electronics", the item should save as "Lidia Hollaway."
3. Issue Raised By - This field should save by current user name like:
User().FullName
4, Issue Raised By Email - This field should save by current user email like:
User().Email
So, for this, I have tried the Patch function with the below code, but facing an error:
Patch('Product Issue Details',Defaults('Product Issue Details'),{Issue:DataCardValue4.Text,'Issue Description':DataCardValue11.Text,'Issue Product':DataCardValue6.Selected,'Issue Product: Category':{Value:Label21.Text},'Issue Priority':Radio2.Selected,'Issue Image':Image6.Image,'Issue Raised By':User().FullName,'Issue Raised By: Employee Email':User().Email,'Issue Due Date':Text(DateAdd(Today(),If(Radio2.Selected.Value=Blank(),"",If(Radio2.Selected.Value="High",1,If(Radio2.Selected.Value="Low",5,3))),TimeUnit.Days)),'Issue Handled By':If(Label21.Text=Blank(),"",If(Label21.Text="Home","Henrietta Mueller",If(Label21.Text="Electronics","Johanna Lorenz","Henrietta Mueller")))})
Facing an 4 errors like:
- Invalid argument type. Expecting record value but a different schema.
- Missing column, your formula is missing a column ID, with a type of number.
- This type of argument 'Issue Handled By' doesn't match the expected type record. Found type text.
- Network error, when using patch function, the specified column is generated from the server and cant be specified

Please Help me, How can I achieve this!