I have an app where I want users to be able to share the record they have just submitted with other users. I have taken the 'People' screen template for users to select the people they want to share with, I then want to patch the email addresses of these people to a column 'SharedWith' in the SharePoint list.
I am struggling with patching the email address information to the record which was just submitted.
I have tested that the LastSubmit.ID function is returning a number (the label with 141 shown in the screenshot below), but I still get the error, 'invalid argument type (number), expecting a Record value instead'
Patch(LAB01, NewFormFill.LastSubmit.ID, {SharedWith: ShareWithEmail.Text})
I don't know if this is relevant but I am testing this on the 'New' form; there is a separate Form with allows users to edit previously submitted records, ideally I want this button to be table to take from whichever was last completed (either NewFormFill or EditFormFill), and patch to the relevant record.
Also probably of note is that I have a hidden label 'ShareWithEmail' which has a conCat function which lists the emails in one place rather than taking them straight from the collection. I couldn't figure out how to just take the emails, so this seemed the easiest way at the time. I am probably wrong and look forward to being corrected if that's the case.
tldr; how do I Patch to the last submitted record?
Solved! Go to Solution.
I'm such an idiot.
I didn't need the .ID so the function
Patch(LAB01, NewFormFill.LastSubmit, {SharedWith: ShareWithEmail.Text})
now works fine.
I can't figure out how to delete this thread so I'm going to leave it up for my own shame and perhaps it will help others.
I'm such an idiot.
I didn't need the .ID so the function
Patch(LAB01, NewFormFill.LastSubmit, {SharedWith: ShareWithEmail.Text})
now works fine.
I can't figure out how to delete this thread so I'm going to leave it up for my own shame and perhaps it will help others.
User | Count |
---|---|
251 | |
102 | |
94 | |
47 | |
37 |