cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Malcyt
Level: Powered On

ONSUCCESS with Custom SP Form

Hi,

I have a custom form where I want to use the List Item ID as part of a generated field using concatante

 

Concatenate("A",Right(Concatenate("000000",Text(ID)),6))

 

However when creating a NEW list Item ID is not availbale on the Form as it is not generated until the item is saved.

 

I read on here that I could use ONSUCCESS and Patch to pick up ID using LastSubmit.ID as this should be available before the form is Reset

 

Can anyone see whats wrong with this :

 

ONSUCCESS = Patch(CC_AssetReg,SharePointIntegration.Selected,{New_x0020_Asset_x0020_ID:Concatenate("A",Right(Concatenate("000000",Text(SharePointForm1.LastSubmit.ID)),6))});ResetForm(SharePointForm1); RequestHide()

 

as i dont seem to be picking up the ID 

 

Thanks

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: ONSUCCESS with Custom SP Form

Hi @Malcyt

 

What is happening is that when you create a NEW item in a custom SharePoint form, the SharePointIntegration.Selected doesnt have the value of the just added item.

 

You have to use a lookup to reference the just added item.

Also, I suggest you to use the Text function to prefixed your ID number with 0.

 

ONSUCCESS = 
Patch(CC_AssetReg,LookUp(CC_AssetReg,ID=SharePointForm1.LastSubmit.ID),{New_x0020_Asset_x0020_ID:"A"&Text(SharePointForm1.LastSubmit.ID,"000000")});ResetForm(SharePointForm1); RequestHide()

Théo

 

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: ONSUCCESS with Custom SP Form

Hi @Malcyt

 

What is happening is that when you create a NEW item in a custom SharePoint form, the SharePointIntegration.Selected doesnt have the value of the just added item.

 

You have to use a lookup to reference the just added item.

Also, I suggest you to use the Text function to prefixed your ID number with 0.

 

ONSUCCESS = 
Patch(CC_AssetReg,LookUp(CC_AssetReg,ID=SharePointForm1.LastSubmit.ID),{New_x0020_Asset_x0020_ID:"A"&Text(SharePointForm1.LastSubmit.ID,"000000")});ResetForm(SharePointForm1); RequestHide()

Théo

 

View solution in original post

Malcyt
Level: Powered On

Re: ONSUCCESS with Custom SP Form

Thanks Theo,

 

Perfect......

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,020)