Hi all,
I use this formula to update a share point list and submit a form
i want the button to filter the sharepoint list and update the fields of the row that contains the mail of the user who submit the button
but it didnt work, please help
Solved! Go to Solution.
Hi @MostafaGamal ,
First(Filter()) and LookUp() are the same feather.
You could use this formula:
Patch(UsersBOS,LookUp(UsersBOS,MailOfUser=User().Email,IsBlank('No.OfEntreis')), {'No.OfEntreis':1,EntriesTime:Now()});Navigate(Screen2)
Best regards,
Hi @MostafaGamal ,
Try this:
Patch(OFSUsersList,First(Filter(OFSUsersList,Mail=User().Email)),{'BOS submitted':1,Date:Now()})
Note: in the I have noticed you are using Date as a filed name in Datasource "DATE" is a keyword should not use
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Hi @MostafaGamal ,
Could you tell me:
1)the data type of Mail field and 'BOS submitted' field?
2)what data do you want to update 'BOS submitted' field?
Please notice that: if 'BOS submitted' field is text type and you want to update with 1, then you just need to update with "1".
if 'BOS submitted' field is number type and you want to update with 1, then you just need to update with 1.
There's no need to use formula like "Number=1".
What's more, if Mail data type is text, then you could directly compare it with current user's email by using "=".
if Mail data type is person, then you need ti compare it with current user's email by using "Mail.Email".
So formula should be like this:
1)Mail is text type and 'BOS submitted' is text type:
Patch(OFSUsersList,First(Filter(OFSUsersList,Mail=User().Email)),{'BOS submitted':"1",Date:Now()})
2)Mail is text type and 'BOS submitted' is number type:
Patch(OFSUsersList,First(Filter(OFSUsersList,Mail=User().Email)),{'BOS submitted':1,Date:Now()})
3)Mail is person type and 'BOS submitted' is number type:
Patch(OFSUsersList,First(Filter(OFSUsersList,Mail.Email=User().Email)),{'BOS submitted':1,Date:Now()})
Best regards,
@KrishnaV thanks to your response, it works fine with this formula
Patch(UsersBOS,First(Filter(UsersBOS,MailOfUser=User().Email)), {'No.OfEntreis':1,EntriesTime:Now()});Navigate(Screen2)
but i want to make some modification to achieve my goal, in the SharePoint there are no. of rows that belongs to the user who will submit ( its like a users list for the app ), i want the formula to update the first blank row for the user by adding 1 and date , and when the user submit again it should update the next blank row by adding 1 and the date
( every user have 30 rows )
@v-yutliu-msft thanks to your response, it works fine with this formula
Patch(UsersBOS,First(Filter(UsersBOS,MailOfUser=User().Email)), {'No.OfEntreis':1,EntriesTime:Now()});Navigate(Screen2)
but i want to make some modification to achieve my goal, in the SharePoint there are no. of rows that belongs to the user who will submit ( its like a users list for the app ), i want the formula to update the first blank row for the user by adding 1 and date , and when the user submit again it should update the next blank row by adding 1 and the date
( every user have 30 rows )
Hi @MostafaGamal ,
Do you want to:
update the first blank row for the user at the first time?
update the second blank row for the user at the second time?
If so, you need to filter blank item to update.
Try this formula:
Patch(UsersBOS,First(Filter(UsersBOS,MailOfUser=User().Email,IsBlank('No.OfEntreis'))), {'No.OfEntreis':1,EntriesTime:Now()});Navigate(Screen2)
Best regards,
@v-yutliu-msft your code is great but i was advised to use lookup() as my data in the SP is more than 60000 rows
patch and filter will not be effective
Hi @MostafaGamal ,
First(Filter()) and LookUp() are the same feather.
You could use this formula:
Patch(UsersBOS,LookUp(UsersBOS,MailOfUser=User().Email,IsBlank('No.OfEntreis')), {'No.OfEntreis':1,EntriesTime:Now()});Navigate(Screen2)
Best regards,
User | Count |
---|---|
262 | |
110 | |
98 | |
54 | |
39 |