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.
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.
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
- 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
- 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
- Get Selected Node Data
- Handle Get Node Data
- Edit this one to parse out the JSON elements that match your keys. (lines 20-22)
- Add / edit the "Set Field" script steps.
- Save Data
- 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.
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):
- Save the tagged text to fields in FileMaker
- Such as saving all the pain points to child records for the patient.
- Trigger an event if an image contains a certain value
- 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.
- Print out a sequence of steps to follow on a treasure map.