I have 3 labels on a screen
I have a sharepoint list with over 3122 records called "list_Login_entry"
Label1 = user_id
Label2 = UserName
Label3 = Date now()
Label4 = Last ID
What I need:
On a button I need to create a new record in a sharepoint list and add this data to columns
sp_user_id
sp_UserName
sp_DateTime
label 4 to display the last ID
Is it possible to use patch for this ?
Dave
Solved! Go to Solution.
To create a new record using the Label contents do this:
Patch(
your_SPlist_name,
Defaults(your_SPlist_name),
{
sp_user_id: Label1.Text,
sp_Username: Label2.Text,
sp_Datetime: DateTimeValue(Label3.Text)
}
)
The next SharePoint Id gets patched automatically so that’s why I did not include it in the PATCH.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
To create a new record using the Label contents do this:
Patch(
your_SPlist_name,
Defaults(your_SPlist_name),
{
sp_user_id: Label1.Text,
sp_Username: Label2.Text,
sp_Datetime: DateTimeValue(Label3.Text)
}
)
The next SharePoint Id gets patched automatically so that’s why I did not include it in the PATCH.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
label4 was just to display the last ID , I did not mean to include it in the PATCH sorry..
dave
Cool. Did my suggestion work?
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
I need some function or method to get the last id in a Large list ?
max is delegable.
The function to get the last ID in a list is:
First(Sort(your_SPlist_name, ID, Ascending)).ID
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
User | Count |
---|---|
196 | |
124 | |
88 | |
49 | |
42 |
User | Count |
---|---|
285 | |
162 | |
138 | |
77 | |
73 |