Get part of the string

  • iliastt
    Asked on August 25, 2020 at 8:50 AM

    Hi.

    I've tried to solve my problem but with no success. So any help would be appreciated.

    I want, when someone fills his bank account ( in IBAN format ) to find the bank automaticaly. I know how the IBAN works. I need the 5th, 6th and 7th position of the string to recognise it.

    But it doesn't work.

    What I've done:

    I have 2 fields. "IBAN" and "Bank".

    My condition is: if "IBAN" starts with (target value) @@## 011

    DO calculate a field's value Summary "Bank"

    The "IBAN" field is masked @@## #### #### etc

  • Bojan Support Team Lead
    Replied on August 25, 2020 at 11:10 AM

    Greetings.

    If I understood you correctly, you need to extract the 5th, 6th, and 7th characters from the string? You can do this using the Substring widget. To use it, you first need to find the ID of the IBAN field. You can find the ID under the Advanced tab:

    Get part of the string Image 1 Screenshot 30

    In this example, the ID is input_3. Yours will probably be different. Also, please note that the "#" sign should not be copied.

    After you get the field ID you need to paste it into the Substring widget. As a starting character you need to place 4, and as an ending one, the number 7. 

    Get part of the string Image 2 Screenshot 41

    Since counting characters start from 0, you need to enter one number less than the one you actually need.

    Let us know if this solution will work for you. 

  • iliastt
    Replied on August 25, 2020 at 1:40 PM

    Thank you very much. It works.