Tagging Objects

A powerful feature of GoDraw3 is to tag an element on the canvas with data. GoDraw3 can be considered a visual way to enter data.

How to Tag

The GoDraw3 example comes with an example of this feature. To tag an object, the user simply  selects an object and presses the "Tag" button. The user enters some information into the fields provided, and they press "Save Data".

In the picture below, red circles are used to identify pain points. 

Retrieve Tags

Once objects in the drawing are tagged, the tags can be easily retrieved since the drawing object is just a JSON object.

The example file contains a script "Find All Tags". When this runs on the JSON object (stored in a field in the custom app), the tags are identified and returned for further use.

Customizing Tags

The tags shown in the examples above are just that: examples. Your custom app can include ANY tags that fits. For example, for this patient diagram, "Value" doesn't really make sense. So the names can be adjusted. Here's how to do it:

Update the fields

  1. There are global fields in the GoDraw3 file / "Data Entry" table. Add to or edit these fields to fit the data you want to capture
  2. Update the fields in the popover. NOTE: the example file uses a popover because the drawing canvas is already a card window. 

Update the Scripting

There are three scripts in the GoDraw3 file in the Application Modules / GiDraw Card Window Example / UI Scripts / Adding Data to Drawing folder. Some of these need to be updated

  1. Get Selected Node Data
  2. Handle Get Node Data
    1. Edit this one to parse out the JSON elements that match your keys. (lines 20-22)
    2. Add / edit the "Set Field" script steps.
  3. Save Data
    1. Edit the $properties variable to Set the JSON with the custom keys and values (the global fields) .

Those two things are all you have to do. Once this is complete, the new keys and values will be retrieved when you use the "Find All Tags" script. 

Continuing On

The above information showed you how to tag objects, retrieve the data in the tagged objects, and customize it. Once you've retrieved the data via a script, you can use that data to do anything you need with it. Here are some possibilities (but this is not the full list):

  1. Save the tagged text to fields in FileMaker
    1. Such as saving all the pain points to child records for the patient.
  2. Trigger an event if an image contains a certain value
    1. For a custom app that holds pictures of art, cause an email to go to the CEO if a piece of art has been given a "damaged" tag.
  3. Print out a sequence of steps to follow on a treasure map.

Still need help? Contact Us Contact Us