Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Script Talk › Help with Form Category
Tagged: Form Category
May 4, 2021 at 4:08 AM #44288
My project requires that the script process multiple records from different forms within a document.
However, I have encountered a problem which I cannot see a simple solution to.
To explain; I have created a document that contains three categories. Within each category I have created forms where the name is the same in each category. I then have a form which I have created to hold the script that I can run once to process content in each of the forms for each category.
An example the Hierarchy would be:
Form:———-Common script container.
I have written a simple ‘hello world’ form level script that I have placed in the ‘Common script container’. This script iterates over each form in the document and displays the form name with a list of its fields.
My problem is that I can’t find a way of differentiating the category when I list off the form names. I realise that I could create my own Category field but it seems that there should be a way of retrieving the category for the form via a function call but I just can’t seem to find anything in the documentation I have seen. I guess I could hard code the form Id to reference existing forms but how can I create a form in a specific Category using the ‘create New Form Named’ function.
Am I missing something?May 7, 2021 at 12:19 PM #44309
Reading the description for Categories, it looks to me that this is just a feature to better visualize forms and it is not a hierarchical component. Specially for your case, it would be helpful to have something like
form.categoryto check which category the form belongs to. There is currently no API to support categories. Maybe something @brendan might in the future.
Instead of using the
formId, you might just use a custom field where you store the category. If it is just for a few forms, that’s not a lot of work and you can hide the field in order not the clutter the UI.
You must be logged in to reply to this topic.