CONTEXT("RecordID") Please 😁

As the complexity of apps grows, the need to know “what record the user is looking at” becomes a very important thing.

  • But in order to get this information right now we have to build a whole system of columns/slices/actions/views to manage keeping track of this info.

Imagine the following scenario:

  • You’re creating a system of check-list items that need to be completed each day

  • Say you’ve created a “Master_Checklist_Items” table - holding 1 record for each “thing” that needs to be recorded

  • Now say you’ve got a “Remaining_Checklist_Items” column, that takes the master list and subtracts everything that has been completed already.
    image

  • Let’s say all this lives inside a daily report, where each day every item needs to be completed - so that “Remaining_Items” list is a virtual column for the “Daily Report” parent table.

That remaining items VC will be a list from the “Master_Checklist_Items” table - literally showing those records in a list.

Screenshots

image

  • So if you were to click on one of them, you’d be directed to the detail view for that “Master Item”

What I really want to happen is when you tap on the item, it launches you into a form to complete that item… for the report you’re looking at.

  • But that “Remaining Item” list is actually from the context of the “Base Master Checklist Table” - and in no way connected to the specific record, and it’s details, that the user is currently looking at.
    • So even if I were to take over the Event Action for that inline table, and instead direct someone to a specific FORM - I have no way of “pushing” the record ID that the user is looking at into that form.
      • I can push the specific checklist item the user clicked on into the form - because the user clicked on that record - but I can’t get the parent reference.
        image

In order for me to get the specific record the user is looking at into the form, I have to create a setting system that allows the user to literally input what record they’re “working on” - that the system can then call.

  • This means I’m either using
    • UserSettings - which requires a sync after each change, making it slow the flow of work.
    • Current_User (slice) - which requires a bunch of overhead, not to mention a bunch of superfluous record changes (from users changing a setting from one thing to another, clearing it, changing it back, etc. etc. - hundreds of “extra” data changes that don’t need to be recorded/transferred).
    • Flag System - which again requires me to create a bunch of overhead: a system of temporary variables, actions, possibly slices, formatting rules, etc. all to point out and isolate the “current record.”

If I could make use of context to pull the record ID from what the user is looking at, then I wouldn’t have to create a system to manage all this.

image

  • This action would run from the context of the “Base Master Checklist” table, but with the CONTEXT() part it would pull the ID of the record the user is currently looking at (pulled from the top level view).

As always, thanks for considering!
partyparrot (Appsheet)