cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
maries1986
Helper IV
Helper IV

Calculated field from Sharepoint ID

Hi,

 

I have a powerapp form where i put numbers and text from 3 fields to populate one field.  it all works good with the following formula:-

Concatenate(Dropdown3.SelectedText.Value, "-P", DataCardValue43.Text , "-", DataCardValue6.Text)
 
The problem is one of the number fields is the Sharepoint ID......i need to save the form and edit then resave for the ID field to populate in the calculated field.  
 
I trying doing a refresh on the sharepoint intregration with OnSave but that didnt work.  
 
Is there any why i can get the ID to update before i save maybe?  i can see the other 2 fields populating live as i fill out the form but of course the ID wont until i save it and SP generates it 
1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@maries1986 

So in your OnSuccess of the form, you will need to supply the following formula:

 

UpdateIf(yourDataSource, ID=Self.LastSubmit.ID,
    {yourColumnToUpdate: Self.LastSubmit.Code & "-P" & Self.LastSubmit.ID & "-" & Self.LastSubmit.'RFS/W No'}
)

 

Although you supplied the column names, I am not sure how they relate to the datacards you originally had in the formula you first posted.  The above is a guess, so rearrange as necessary. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

7 REPLIES 7
RandyHayes
Super User
Super User

@maries1986 

You will need to do this in the OnSuccess of your form as an additional action.

Let me know what the names of the columns are in your record that make up the three fields you want to put together and I can suggest for you what you need in the OnSuccess.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
maries1986
Helper IV
Helper IV

Thanks @RandyHayes 

 

The column names are:-

 

Code-ID-RFS/W No

RandyHayes
Super User
Super User

@maries1986 

So in your OnSuccess of the form, you will need to supply the following formula:

 

UpdateIf(yourDataSource, ID=Self.LastSubmit.ID,
    {yourColumnToUpdate: Self.LastSubmit.Code & "-P" & Self.LastSubmit.ID & "-" & Self.LastSubmit.'RFS/W No'}
)

 

Although you supplied the column names, I am not sure how they relate to the datacards you originally had in the formula you first posted.  The above is a guess, so rearrange as necessary. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

maries1986
Helper IV
Helper IV

@RandyHayes 

 

Great!  thanks...it worked.

 

this is what i have in the OnSuccess now - 

UpdateIf('Engagements Testing new app', ID=Self.LastSubmit.ID,
{'Systal PCode': Self.LastSubmit.Code & "-P" & Self.LastSubmit.ID & "-" & Self.LastSubmit.'RFS/W No'}
);

ResetForm(Self); RequestHide();
RandyHayes
Super User
Super User

@maries1986 

Excellent!  So if all is working, please go back to my response with the formula and mark it as a solution so others can find similar problems and solutions easier.

Thanks!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
maries1986
Helper IV
Helper IV

Done for you @RandyHayes 

 

You missed out the last & before Self......if you can edit.....stick it in incase others dont spot it 🙂

 

Thanks again!  i had been at that for hours!

RandyHayes
Super User
Super User

@maries1986 

Good call...took me a minute to even spot what you were talking about.  Saw it and corrected!  Thanks for pointing out.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,417)