Combining column values to create unique key ...

(Tyson Carmichael (FlyTy)) #1

Combining column values to create unique key

Hello All,

I have a table with four (4) columns: 1.SWOT ID 2.SWOT Name (to be entered by user)

3.SWOT categories (Values: Strengths, Weaknesses, Opportunities, Threats) 4.PESTEL categories (Values: Political, Economic, Socio-economic…Legal)

I want the SWOT ID computed as follows: [1st 3 characters of SWOT Category value] + [1st 3 characters of PESTEL Categories value ] + Record Number

So for example, if the values selected for record #1 was strengths, political I would like the ID computed as follows:

[ STR ] + [POL] +1 = STRPOL1

How would I go about implementing this?

Thanks!

(Aleksi Alkio) #2

May I ask where do you get that number (1)?

(Aleksi Alkio) #3

Other than that, the formula would be like… CONCATENATE(LEFT([1st 3 characters of SWOT Category value],3),LEFT([1st 3 characters of PESTEL Categories value ],3),Record Number)

(Tyson Carmichael (FlyTy)) #4

@Aleksi_Alkio it doesn’t exist in the file.

Thinking about it as a record counter that can be attached. Similar to how the uniqueid() generate a code.

It is as if uniqueid() generated the record counter starting at the number 1

(Tyson Carmichael (FlyTy)) #5

Thanks. Where do I place that formula?

(Aleksi Alkio) #6

If you have more than one user, the numbering won’t work. When two users are using the app at the same time, there will be two records with the same number.