Suspect there is no easy answer to this - but here goes!
In the absence of any submenu option in Glide - can anyone advise how to achieve the following?
Several projects in a project table. Users can choose a project which takes them to a detail screen with further details. Easy.
But I need to put a lot of detail on that detail screen - so ideally I would have pages added to the menu bar as necessary - or tabs or similar across the top (see screen shot from another no code builder I experimented with).
The tabs / buttons would need to be dynamic, as I will have a lot of projects and a lot of different information for each - so maybe a âTABSâ table - with a list of available screens, and which project they relate to - or similar.
Any ideas - I started building it with lots of collections and visibility rules (Buttons writing to a user specific column in the user table as suggested in one of @Robert_Petitto excellent videos , but it gets complicated and messy very quickly.
With Classic Apps it was relatively easy to get something like this using a segmented choice component and a bit of CSS. But we donât really have that option any more.
I think a reasonably clean option would be to use a Collection as a menu. So one item in the collection for each of your âsub-tabsâ, and then use a branching action that does a separate Show New Screen â This item for each one. This will give your 5 separate blank canvasses on which to build out your respective sub-screens.
Itâs not an ideal solution, but itâs probably what I would do. Below is an example of the sort of thing I mean - whatâs shown below is a single collection, but each item leads to a separate, independent screen on the same row.
YaâŚbutton bar or choice component to write a value somewhere. Use that value as visibility condition for a container of components.
I asked Tristan a few months ago if we could have a tabbed âcontainer containerâ so we could have this functionality natively. Weâll see if it ever makes it to development.
Will give each option a go on a test site I have. Realised I canât add a screen (Tab) for the menu and add a visibility condition - as there is no way of setting visibility based on screen data
@Darren_Murphy Can I just check as I donât seem to be able to get it to work as you suggest.
On a detail page for the project, I have added a collection and set the source as a table called Tabs. Set as an XS grid so nice and compact.
In that tabs table, I just have for now the name for each of the 5 âsectionsâ. So far so good.
I then enable advanced actions for that collection, and set the action for Item click to âShow new screenâ and I set Data to âThis itemâ and target as current.
I was kind of expecting or hoping to get a blank canvas with the âNew screenâ option - whereby I could lay the screen out how I liked - then I could lay out a separate screen for one of the other options. But it seems to just give me the same screen layout, but with the different data. I tested this by putting 'hard coded" text onto one of the screens - but of course it was identical when clicking a different tab.
I didnât get the 5 separate screens you suggested in your post.
Or am I missing something?
Begs the question - what is the difference between Show new screen, and Show detail screen?
Sorry - I am either misunderstanding completely, or not explaining what I am after very well.
Was hoping I could have effectively 5 different screens, with a different layout and reading from a different table - all linked from one of 5 buttons or a collection with 5 items off a âProjectâ page.
Iâve added a collection of the 5 items - and added an action with a âShow New Screenâ but that just opens a new screen for the current collection. I want a different page entirely for each of the 5 options.
I would give a tip that works for me, change your 5 view name texts to a numeric field (1-5), so that If Name = 1, If Name = 2 etc are in your custom action.
And elsewhere enter the names for these and display them, that way all your functions still work if you ever decide to change the name (otherwise if you change PDF to PDF File) you have to go find all the actions where you wrote the plain text âPDFâ and retype it to the new name.
Great Iâm glad you get it as well I didnât have to go into more detail! Also if you ever do a similar thing with a choice component rater than a button, you can just write the numeric value of the choice but display the text value of that choice for selecting.
And if you have similar views across the whole app and want the choice to be the same (until changed) across all screens - write the choice to the User Field, so no matter where they go, the app knows the users current choice is Option 2 or whatever it may be.
Really pleased with what I have - and I think this is the final piece I needed to crack!
Could do with some better options / ideas for laying out the âtabsâ - this is what I have come up with so far - the tabs âPDFâ, âIssuesâ and âAccommodationâ take you to different screens.
The âStacked versionâ scales better on different screens but takes up a lot of space - and I donât like the text spacing on the horizontal version. Going to have a play with icons - maybe heroicons could help!
One option would to make a single action row - donât add a text or label or image, simply put your values in the action text name. You get a nice button alternative. You will notice buttons donât change visually when you have clicked (unlike a choice), there are some tricks for this but - for now you set the currently viewed tab to an impossible action and it will render differently. For bonus points you can throw in an icon to the action!
Only thing is, I have several projects and the tabs each project needs will be different for each one. They wonât all need the same tabs. The action row, I donât think can be populated dynamically.
Using the Collection view, I can read the tabs from a table and add conditions to filter on project.
Still a nice option though - will definitely be using that somewhere.
On a similar subject - once a ânew screenâ has been created - can it be linked to or referenced from elsewhere? I canât find a slug or reference to it. I have seen options for âLink to current screenâ - but canât see that now. More out of interest than anything - wondering if there is a list of all pages / screens created somewhere
Yes and no. New screens are not as accessible as detail screens.
You can reuse custom actions, so if you call the same action elsewhere (with a New Screen action inside of that custom action), then I think you should get the same screens. I guess Iâm not sure how that works with âthis itemâ if you are calling the same action from different data sources.
On the other hand, a Detail screen is permanently attached to itâs source table, so anytime you use âShow Detail Screenâ, you will get the same layout.
Ahhh - realised (after a lot of trial and error!) that putting a single button component inside a Custom collection - lets me do this. I can have dynamic buttons!
Thanks for the idea - just my bad execution that was at fault!