cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Prepending an ID with Text

Hi all, I am hoping to get some assistance for prepending an ID for a form. So in my examples, I have a field called Form ID where the formula is:

 

If(SharePointForm1.Mode = FormMode.New, Last('IRF Center').ID + 1,Parent.Default)

This gets me what I am looking for which is the ID of the last form submitted +1.

 

Where I need assistance is I want to prepend all of the Form ID's with "IRF-" so instead of returning just the number, it will be "IRF-1", etc. I feel like there should be a concat in there, but have no idea how that would work. Can anyone help me?

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Prepending an ID with Text

@jjohnson 

Are you looking to prepend the ID for display only, or in your SharePoint list? 

If for display only, then you can simply use the Concatenate function Concatenate("IRF-", ID) or a shorter version - "IRF-" & ID

Note in both above, ID is referenced out of context, so whatever leads you to the actual ID is what is needed (ThisItem.ID, Formx.LastSubmit.ID, etc).

 

HOWEVER...you are messing with the ID of your list.  In general this is not something you assign or alter.  And, in fact, you will not be able to alter the ID with any prepended text within the actual SharePoint record.

As well, ID is auto-incrementing, so you don't need to determine the next number in order to assign it.  It will happen automatically.  In general, the ID, if used in a form, should always be display only and not something to edit.  Otherwise you will have errors.  From a New record perspective - not even worth displaying as it does not exist yet.

 

If you need some sort of ID'ing process that would have prepended values or other requirements, then I would suggest putting it in its own column apart from the SharePoint record ID.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Anonymous
Not applicable

Re: Prepending an ID with Text

Hi @jjohnson how are you progressing with this? Was the above reply helpful?

 

@Anonymous 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

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

Top Solution Authors
Top Kudoed Authors
Users online (5,854)