cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User III
Super User III

@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.
Check out my PowerApps Videos too!
Anonymous
Not applicable

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

 

@Anonymous 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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