cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Patron
Post Patron

Getting sharepoint list ID onsuccess and add text to it.

Hi

 

I know this can be done easily enough I can't just seem to hit on the right formula 🙂

 

I am submitting a canvas form which is creating an item in a Sharepoint List.  OnSuccess I want to take the auto generated sharepointID add a few letters to it and add it to a text column in the sharepoint list as well as showing it on screen...so to create a nice unique reference that is not just a plain number such as the sharepoint ID.

 

Eg:  autogenerated sharepointId    234     my text column should read   CRQ-234 and ideally show that in a dialogue box that shows on success...

 

TIA

 

 

  

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@vffdd 

You can use the LastSubmit property of the form to retrieve information about what was submitted to SharePoint including the ID number.  Then you can perform a PATCH function to update the record with your desired custom ID number.

 

Set(lastRecord, Form1.LastSubmit);
Patch(your_datasource_name, ID=lastRecord.ID, {RefColumnName: "CR-"&lastRecord.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."

View solution in original post

2 REPLIES 2
Super User III
Super User III

@vffdd 

You can use the LastSubmit property of the form to retrieve information about what was submitted to SharePoint including the ID number.  Then you can perform a PATCH function to update the record with your desired custom ID number.

 

Set(lastRecord, Form1.LastSubmit);
Patch(your_datasource_name, ID=lastRecord.ID, {RefColumnName: "CR-"&lastRecord.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."

View solution in original post

Perfec thanks that's all I needed was just having a blank moment !! 🙂

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (37,192)