Boolean field type – adding via script

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Script Talk Boolean field type – adding via script

Viewing 2 reply threads
  • Author
    Posts
  • August 17, 2021 at 11:32 PM #45007

    Tom Kerswill
    Participant

    Hi

    I’m programmatically creating fields using:

    form.addNewFieldNamedWithType(key,fieldType)

    The documentation for that function in the scripting API gives the following field types:

    [text, number, calc, location, photo]

    I’d like to add a boolean / checkmark / yes-no field.

    Is this possible using a script?

    Tom

    August 18, 2021 at 7:33 AM #45010

    Daniel Leu
    Participant

    Yes, this is possible. Looks like just a case of missing documentation.

    form.addNewFieldNamedWithType('my new field','check_mark')

    August 18, 2021 at 3:15 PM #45011

    Sam Moffatt
    Participant

    Reference to an earlier post on supported types for addNewFieldNamedWithType:

    The field types you can use in the addNewFieldNamedWithType command are all the field type names in lowercase with underscores between the words. Except for Date & Time, which is just date_time. But if you export a CSV file with field type tags enabled, you’ll see them in the header row.

Viewing 2 reply threads

You must be logged in to reply to this topic.