Visibility based on caller

0
I have l selector popup (page) that has a select button and a datagrid (basic stuff).  It works great, but I also want the page to launch from a menu item.  I have that working also, except it doesn’t make sense to show the [Select] button when launched from a menu item.  I want to set a visibility expression, but I’m at a bit of a loss as to the best approach. One idea was to run a Microflow instead: one to launch as a selector, and another for the menu, then somehow pass in a value to the popup,  I don’t want to if I can avoid it.  Is there a “state” somewhere I can check to know who called/launched the page?  If I can write an expression using that it would be easier, thanks.
asked
2 answers
1

The state you’re looking for doesn’t exist unless you create it. It needs to be in the form of an object in a data view. So, I recommend creating a non-persistent helper entity that contains a boolean.

answered
0

The proper answer is you cannot easily do what I wanted to.  You cannot use a helper object for a popup window triggered from a form input control to use as a picker for a list of items, as the return value of the popup must match the form field type expected.

The best option is to have one page as a popup and copy-paste it, then change the duplicate. Having two duplicates is not ideal, but it works for now.  The benefit at least is I can customize them more individually (one as a popup and one with a layout).  It would have been great if snippets could be use in this case.  I don’t know why a page cannot detect that a data grid exists in a snippet, or just “hand off” its context to a snippet on the page (a forward option), so I don’t have to maintain multiple copies of a data grid, but perhaps this is an edge case. Ideally, it would be great to pass varaibles created in a microflow to a page.  This does not feel very flexible at all.

answered