Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Use confiforms text field to create unique reference

laurent November 13, 2020

Hi

I have 3 text field. One f1, two f2 and three f3=CONCAT f1&f2. With this I want to have only 2 first f1 characters and 3 last f2 characters and concat them in f3. I tried all confiform virtual fonction and I found any solution to do that.  How can I extract X first or X last characters from text field ?

thanks 

2 answers

0 votes
laurent November 24, 2020

Finally it doesn't work. I used LEN function minus x or y to calculate number of character to "delete" to have only 3 last character for exemple. However it seems the trunc function doesn't  accept field as variable as argument.....

0 votes
Alex Medved _ConfiForms_
Community Champion
November 13, 2020

You can use trim* and trunc* virtual functions

Something like this

Screenshot 2020-11-13 at 18.18.58.png

laurent November 13, 2020

Yes I already tried this but I don't know f1 and f2 text value length so if f1 is loremipsum, f1.trimLeft(2) = loremips not lor. Same pb with trunk function.

Alex Medved _ConfiForms_
Community Champion
November 13, 2020

You can get X characters from start or from end... depending what function you use trim or trunc... I dont quite understand your comment

laurent November 13, 2020

If f1= azerty I want obtain rty with f1.trimLeft(3) I'll obtain aze 

if f1= azertyuiop I want obtain iop with f1.trimLeft(3) I'll obtain azertyu

I don't know how to use trunc ou trim to keep only 3 last characters or 3 first characters form text field.

Alex Medved _ConfiForms_
Community Champion
November 13, 2020

How about this example:

Screenshot 2020-11-13 at 22.04.21.png

laurent November 13, 2020

Thank you !

I think hel-ld is the solution. I will try it !

laurent November 24, 2020

Finally it doesn't work. I used LEN function minus x or y to calculate number of character to "delete" to have only 3 last character for exemple. However it seems the trunc function doesn't  accept field as variable as argument.....

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events