Hi Brendan,
I really like the new Tap Forms Pro — Thank You!
I migrated from Tap Forms 5 and one of the scripts no longer works. It gets the values from a linked form and populates fields in the current form.
How can I make it work again?
Thanks in advance
Attachments:
You must be
logged in to view attached files.
There’s seems to a slight change in the API that sessions
is now an array. I discovered this yesterday. With the link, there can only be one element. So adding following after the var sessions =..
line should fix it.
sessions = sessions[0];
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks
Thanks Daniel. I converted sessions
to an array and didn’t get an error. Interestingly though, it then only populated the empty date field, and not the two other empty text fields. I worked out that the empty date field is undefined
while the empty text fields are no longer undefined
but ''
. It’s now working again.
Thanks for your help.
Another question. In TF5 the ‘Session surgeon’ and ‘Session hospital’ weren’t text fields but links from separate forms. The script was able to extract the values and populate fields in the present form. In TFP the ‘linked to’ fields don’t appear in the scripting window and it doesn’t appear on the face of it to be possible to get the values. Or is it?
Attachments:
You must be
logged in to view attached files.
Strange! They should be there as well if properly linked. Maybe something happened during the migration. Check your form that the fields link to the proper forms and that the _Show Reverse Relationship_ is checked.
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks