Forum Discussion
John Dorrian
Jun 02, 2020Brass Contributor
Unique ID issues calculation looses [] every time page is refreshed
Morning, Hope someone can help.
I created a UID field using the concatenate function with a prefix and then the ID field.
=CONCATENATE("HUB",[ID])
The issue is the [] round ID disappear each time the page is refreshed and I get a return of HUB for each new entry until I manually reinsert the square brackets round ID. I remember years ago there was something around the use of [] and () depending on where you were based but I thought that was sorted. When I use the () it doesn't apply the calculation to new records, but keeps the old records.
The other issues that stem from this the flow that emails customers with their UID will just return them HUB. Any suggestions on what I could try? Or where I'm doing wrong with the concatenate function?
Kind Regards
John
John Dorrian : Thanks John !... You need to create a separate number column, e.g. called [UID]. Then you need to create a flow that will fill in this column with the actual ID value like HUB123.
Creating flow will be easy and fast solution in this case.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.Regards,
Ashish
- Ashish_KohaleIron Contributor
John Dorrian : Yes, ID column is there in the calculated column selection field, check column setting screenshot, where inside insert column box does not have ID column, ID is not supported in calculated columns and always disappear. When you open list settings, check cal. column settings or change something in formula and hit OK, will be visible (for a while), but later when you add new item, new calculated value field will be blank again.
1) ID is not valid column to use in Calculated Formulas, it is not displayed in the available columns for a reason.
2) It is 0 for newly created items as it get its value from the database after all Formulas are evaluated
3) You get the correct values (in all existing items) if you re-edit the Formula.
Note: Workaround is to use workflow or JavaScript/jQuery.
- John DorrianBrass Contributor
Thanks for the info, and at least I know not to use [ID] for calculated fields.
I think as a workaround I could do just use the ID field as is (sequential number) within the list but for the Flows and automatic emails add the list prefix (in this case HUB) before the ID field so when queries come in to the service desk they know which list and record to look up.
I'll look into java and jquery when I have a bit of free time. Thanks again for the info, every day is a school day 🙂
Kind Regards
John
- Ashish_KohaleIron Contributor
John Dorrian : Thanks John !... You need to create a separate number column, e.g. called [UID]. Then you need to create a flow that will fill in this column with the actual ID value like HUB123.
Creating flow will be easy and fast solution in this case.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.Regards,
Ashish