Afternoon everyone,
In my solution I’d like to hide the status toolbar and make the user navigate and enter/edit data by means of scripts only.
So I’ve been googling for example scripts. They’re tough to find, but most probably I’m searching with the wrong terms. Voicing what I’d like Filemaker to do I can, but translating this into script steps is hard (at the moment), but I hope to learn. I was wondering if the community could supply me some example scripts.
What I would like to achieve is the following.
User is on a layout of an invoice header. On the same layout is a portal with the invoice lines.
Instead of inserting/editing or deleting invoice lines directly into- or from the portal, I have thought of the following.
New portal row
User clicks button called ‘New Invoiceline’. (there may be no invoice lines in the portal yet, so this button is always visible)
Filemaker opens a card window (and keeps it open until OK-button or Cancel-button is clicked)
User types data into fields; then
a) User clicks OK button; Record is committed; Card window closes; Filemaker returns to the original layout; The just committed invoiceline is shown in the portal.
b) User clicks Cancel; Record is not committed; Card window closes; Filemaker returns to the original layout. The portal has not changed.
Edit portal row
User clicks button called ‘Edit Invoiceline’ (the button will only appear if a row is selected in the portal)
Filemaker opens the same card window as above (and keeps it open until OK-button or Cancel-button is clicked)
User edits the data in fields.
a) User clicks OK-button; Record is committed; Card window closes; Filemaker returns to the original layout; changes are reflected in the portal row.
b) User clicks Cancel-button; Record remains unchanged; Card window closes; Filemaker returns to the original layout.
Delete portal row
User clicks button called ‘Delete Invoiceline’ (the button will only appear if a row is selected in the portal)
Filemaker opens dialog asking if the user is sure he wants to delete this line
a) if confirmed; close dialog; delete record
b) if canceled; close dialog
Filemaker returns to the original layout.
Above shows how I’d like Filemaker to behave when these actions are initiated by the user. Of course in-between steps also take place, like e.g. recalculating summaries in the invoice header when invoice lines are added, edited or deleted, but I think I can get these to work if not taken care of automatically already by Filemaker.
Sunny regards,
Maurice