I have a button on the loading page that when selected should do some things:
- Check if an item has been created in the Sharepoint list by the user. We want only one entry in the list per user.
- Navigate to the page with the form.
- Set the form on the page to 'new' if a record created by the user does not exist, or set the form to 'edit' and populate with the record if an item has already been created by the user.
I found a Post that seems to do exactly what I want to do : https://powerusers.microsoft.com/t5/Building-Power-Apps/check-if-item-exists-if-not-create-new-using-button-to-navigate/m-p/579778#M181063
However the code does not work for me. I think I have changed the appropriate parts for my app. However I get an "invalid argument type" error message. I can not figure out what is invalid.
My code:
Set(recordID, LookUp(SP_List,Variable='Created By'.Email, ID));
If(IsBlank(recordID),NewForm(Form1), EditForm(Form1));
Navigate(MyForm);
Anyone have any ideas what I am doing wrong?