Hi Matt,
This is a lot into business rules, but I will try to explain as best as I can without giving away business rules. For reference, consider that the logic is associated to a call center, just as an example, because this is not what where am I does, but the this process is similar enough.
Consider that you have a page that loads a bunch of information that a user like an agent will read. That information is related to client being filled in. Today in Salesforce and SKUID you can use Mustache to fill in the blanks, the caveat is that the fields for Mustache aren’t human friendly.
Example:
{{$Model.Client.data.0.first_name}}
For an user this is extremely hard to read, for a developer, not so much. Now if we had a place that would say that label = token, that would help, correct?
What I have built is a model that will hold the text that the agent will read and will give them a list of available fields to use within the text. So a manager, for example, could edit that text and add information to it.
Example:
Lorem Ipsum {{$Model.Client.data.0.first_name}} yada yada yada
If this was in a single page where the user would have a list and edit each one of them individually it would be simple. Create a page, add a model, have some edit buttons and voilà magic would occur. Unfortunately that doesn’t work because the manager, in order to write the texts correctly, needs to see how they would appear on the page. There is also a restriction to not show any extra information to add tokens that aren’t related to that page.
Considering the above, solution: create a page with the edit form and load it via modal. Attempting some re-use at least. At this point the edit form won’t know what to load to be edited, so I’m passing query strings to load that form. The query strings passed via dialog to the form are not accessible via javascript, which means loading the object via javascript is not possible.
The solution was to create a model that is Ui-Only model to receive the query parameters and a set of actions on the model to set those query parameters on the model and then load it.