How to get the name of a Button (object)?
This would seem to be an easy thing to do, but for some reason I'm coming up with zero answers even after extensive searching. So either I'm missing something obvious or FM Pro is lacking a rather simple script command. Wouldn't be the first time for either situation :D
I have two buttons which are labeled NEXT and PREVIOUS respectively. The straight forward way to make this happen is to create a NEXT script and a PREVIOUS script, each of which call their own specific scripts in different files. This would seem to be a fine solution, but I have some rather complex relationships based on the layout used which requires scripts to find/sort information in various files in order to be in a predictable state for other functions.
What I would like to do is create a single script that both buttons link to. When that script fires it gets the name of the button, sets a variable to tell subsequent scripts to use "Goto Record/Request/Page Next" or "Goto Record/Request/Page Previous" script steps, then fires the correct script/s based on the GetLayoutName parameter (I have 8 layouts). If I can't get button names then I'm going to need two scripts in my master file (one for Next and another for Previous) and two scripts for each layout depending on the choice. That's 18 scripts instead of 9! Since I have other needs for button name identification I figure now is a good time to ask ;)