cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Memorable Member
Memorable Member

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
Memorable Member
Memorable Member

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

Frequent Visitor

Re: ONSUCCESS with Custom SP Form

Thanks Theo,

 

Perfect......

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (4,039)