Update another field using substring

Issue #344 resolved
Michael shechter created an issue

hi fidel,

I got a text custom filed that contained active directory user with the flowing formats
1.LOLAON\bh0ilona 2.mm00zomi@lolaon.com 3.oplhezi i want to do substring so i will be able insert it to user picker field. for example instead LOLAON\bh0ilona it should be bh0ilona or instead .mm00zomi@lolaon.com it it should be mm00zomi how can i do it thank you !

Comments (6)

  1. Fidel Castro Armario repo owner

    Hi Michael,

    According to you description I assume there are 3 different patterns:

    1) LOLAON\bh0ilona should be converted to bh0ilona

    We want to extract the substring from '\' character to end of line.

    2) mm00zomi@lolaon.com should be converted to mm00zomi

    We want to extract the substring from beginning of input to '@' character.

    3) oplhezi should be taken without any transformation.

    If there isn't a '\' or a '@' character, we want to take the whole string.

    Is my description correct?

  2. Michael shechter reporter

    Yes you are right

    בברכה מיכאל שכטר | צוות בקרה | מטה אגף מערכות מידע | איילון חברה לביטוח טלפון: 072-2227393| E-mail: Michael-sc@ayalon-ins.co.il

  3. Fidel Castro Armario repo owner

    Use "Copy a parsed text to a field" with the following configuration:

    • Target field: select the User Picker field
    • Parsing mode: advanced
    • Text to be parsed:
    replaceFirst(%{nnnnn}, "(^.*\\\\)|(@.*$)", "")
    

    replacing nnnnn with field code for text custom field containing active directory user.

  4. Michael shechter reporter

    Thank YOU very much !!!

    בברכה מיכאל שכטר | צוות בקרה | מטה אגף מערכות מידע | איילון חברה לביטוח טלפון: 072-2227393| E-mail: Michael-sc@ayalon-ins.co.il

  5. Log in to comment