Reading Cursor Field

Is it possible to determine the name of the field in which the cursor is placed/the snippet was triggered. A couple of case uses are:

  • If, I am in First Name, enter the first name, then tab down to the last name field. If, I am in Address, Complete the address field, then tab down to the First Name field etc. Ultracomplicated would be to make one for every field and either tab or shift-tab around to complete all of the data no matter where you start the snippet, but that's pretty ridiculous so I have no intention to go there. Primary reason is the below one.

  • I have a primary and secondary address field that could be completed but the tab through count is different one is 1-2-2-2-2 between fields and one is 3-2-3-3-2 thanks to help text things. If I knew the field name the cursor was in, I could have it behave appropriately according to the field information.

Hi @Kevin_Roberts , unfortunately there is no information on which field the snippet was triggered from. In fact, it is very hard to accurately program such kind of information.

Possibly, you can create two different snippets depending on where you intend to trigger it from. If you are worried about duplication, you can factor out the common parts of the two snippets into a third snippet and then import it (using our {import} command)

Let us know if you have more questions. Cheers!

Thanks for the answer, although it isn't the one I hoped for. Yes, my rugged way of doing it was to do 3 snippets. One that does the legwork, then importing into two separate snippets which output differently according to the situation. It works just fine, but it isn't as simple as I was hoping it could be.

I also realize this could be done via a dropdown selection within a single snippet, but that has the annoyance of selecting and the time it takes to do so as a downside. Those half seconds count! :slight_smile: