Extract Text Characters from Another Field

  • eascarpenters
    Asked on April 30, 2019 at 10:01 AM

    Hello,

    I am using a registration form for classes and I created a field on the form called "Class ID" where I created a formula to generate a unique class ID based on the date of the class.  However, we are growing and there are and will be more instructors that will result in more than one class in any given day.  So I added another condition to put the person's initials into the class ID so the result is "Date-Initials".

    I had to create a condition where if the instructor's email was a specific value to assign the initials into the class ID.  However, as we continue to grow, I would prefer NOT to create a new condition for every single instructor. 

    Would there be a way to "extract" characters from another field.

    Example:  If Name = Joe Smith, extract the initials "JS" somehow...

    Is that possible?

    Any suggestions you have would be greatly appreciated!

    Thanks,

    Alissa

  • Elton Support Team Lead
    Replied on April 30, 2019 at 12:01 PM

    You can achieve that when you use two separate text boxes (Single Text Entry) for the first name and last name fields, not the built-in Full Name field.

    After that, use the Substring Widget to get the first letter of the two textboxes.

    Here's a Demo: https://form.jotform.com/91187544397974

    This has only 1 condition to get the first letter from the Substring Widgets.

    Feel free to clone this form if you like so you will be able to inspect the setup and the condition.


  • eascarpenters
    Replied on May 6, 2019 at 7:33 AM

    Hi there,

    Great!  Thank you!  I am almost there.  I added 2 substring widgets to this form:

    https://form.jotform.com/83035267339157

    One widget for the First Name Initial and the other widget for the Last Name Initial.

    However, only the First Name Initial is working:

    https://www.jotform.com/sheets/83035267339157

    Can you help me figure out why the Last Name Initial is not working?

    Thanks,

    Alissa

  • jonathan
    Replied on May 6, 2019 at 9:22 AM

    I cloned your form to be able to see and test the widget

    https://form.jotform.com/91253408035956

    It appears to be working as intended.

    1557148878zzz 2019 05 06 21 Screenshot 10


    Can you please check again on your form.

    You may want to unhide the Substring widget first while testing so you can see it in the live form.

    Let us know if issue persist.

  • eascarpenters
    Replied on May 6, 2019 at 11:43 AM
    Hi there,
    Thank you so much for your help. I greatly appreciate it!
    Maybe I should have asked you to look at an additional step that I am looking to do with this field… I am looking at both substrings to generate the Class ID. I have a condition that I am using to do this. The Class ID would generate as the following:
    ICRA-{date of class}-{FI}{LI}
    The only part that is NOT working on a new submission is {LI}. If you can please go ahead and fill out the form, you will see that it’s not taking the Last Initial. As you fill out the form, you will see it being generated in the URL Parameters at the bottom of the page:
    [cid:image001.png@01D503FF.DE6BFAE0]
    Please fill out the form and submit it and let me know if you are seeing the same thing.
    Thanks so much!
    Alissa N. Kline
    Administrative Assistant
    Keystone Mountain Lakes Regional Council of Carpenters
    650 Ridge Road, Suite 200, Pittsburgh, PA 15205
    (412) 922-6205 x4227
    ...
  • denis_calin Jotform Support
    Replied on May 6, 2019 at 1:54 PM

    Hi Alissa!

    I have cloned your form and took a look at the conditions. I was able to create a new field called Class ID 2, and set it up with the following condition:

    1557164951Screen Shot 2019 05 06 at 10 Screenshot 10

    I have tested it and it is displaying the ID as desired: ICRA{Date of Class}{First Name}{Last Name}. The issue was with the triggering condition: since the first name was already filled, the condition wasn't listening for the last name and its value was not passed to the ID field. Please clone this form to see how it works:

    Form: https://form.jotform.com/91255461551960

  • eascarpenters
    Replied on May 8, 2019 at 8:43 AM
    AWESOME!!!! That did the trick!!!
    Thank you so much!
    Have a great day!
    ...