Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Select custom layout from Javascript
Tagged: Custom Layouts, scripts
- This topic has 6 replies, 3 voices, and was last updated 5 years, 2 months ago by Daniel Leu.
-
AuthorPosts
-
October 3, 2019 at 8:09 AM #36941
Daniel LeuParticipantHi Brendan,
I work on a CRM system using Tapfroms where I would like to guide the user (eg, me:) along the way. I used custom layouts to add a new client, quotations, orders, and sales. Each has its own form and custom layout.
On the client form, I would like to have buttons for ‘quotation’, ‘order’, ‘invoice’. etc. Clicking a button would trigger a script that creates a new record in the respective form. Next I would like to display directly the custom layout to enter the needed information, eg, form.showLayoutNamed(‘my fancy quotation layout’);.
I haven’t seen anything in the documentation supporting this. Is this something that could be added? This would make it much easier to implement flow-like applications and guide the user along.
Thanks,
DanielOctober 3, 2019 at 8:27 PM #36945
Sam MoffattParticipantThere is a
form.selectRecord()
that uses the default layout, a minor improvement could beform.selectRecordWithLayout(record, layout)
to automatically display a given layout and maybe layout introspection (e.g.form.getLayouts()
andform.getLayoutNamed()
).I have an extra request to support adding a layout to the record URI, e.g.:
tapformz://record/view/db-5af742cf299940b1b9ad32e7fae7ec41/frm-efc0199a2b1543f79e722383014533b0/rec-31b197f418a44b518ea6bbd2ffeb95ac?layout=lay-c900145cfc2d47d297b795a7ca56d4c7
That way you could use an external application to open a link directly to the database, form, record and layout.
October 3, 2019 at 11:48 PM #36948
BrendanKeymasterform.selectRecord()
just selects the record. It doesn’t specifically do it for the Default Layout. It displays whatever the last layout that was selected. Tap Forms stores that information in a preferences file (DocumentProperties.plist) within the .tapforms document so it knows what layout to display the next time you view a form’s records.It definitely sounds interesting and useful to add some more UI automation features to the scripting engine.
October 4, 2019 at 11:17 AM #36956
Daniel LeuParticipantSam, I like the idea of having the layout option for the record URL. That opens the door for some elegant notifications, among others.
Brendan, cool that this feature request gets a positive feedback. If you are looking for some alpha/beta testers, feel free to contact me.
October 4, 2019 at 12:11 PM #36959
BrendanKeymasterHi Daniel,
I’m always interested in having more Tap Forms beta testers.
Send me an email and I’ll give you access to the betas.
October 4, 2019 at 12:12 PM #36961
BrendanKeymasterActually I just used your forum email address. So now you have access to the betas in Dropbox and also access to the beta tester’s forum here.
October 4, 2019 at 1:44 PM #36962
Daniel LeuParticipantActually I just used your forum email address. So now you have access to the betas in Dropbox and also access to the beta tester’s forum here.
Thank you! And the image copying to client forms works in the beta. Yeah! Thanks!
-
AuthorPosts
You must be logged in to reply to this topic.