I have a tab hosting a Collection as a list that is sourced from my Primary Data Table. That primary table is a list of properties I manage (swimming pools). I have another table that serves as a Chemical log. Each row in the Chemical log has the property name, date, and chemical readings.
I have a 1>many relation set up between these tables such that each chemical log reading for pool#1 is a “child” of pool #1.
So if each pool is an item in the Pools tab collection and I click on pool #1, I have open the details page for pool#1. On that Details page I have another collection using the relation to the chemical log to show a list of all the chemicals readings at pool#1. Great.
What I’m stuck on is making a button to open the chemical log as a detail screen so I can view the log on its own. For some reason, the actions don’t want to accept the relation that is clearly there and working since the chemical log collection on the pool’s detail page is sorted correctly.
What is really crazy is that I did have it sorted at one point… but it involved for some reason making copies of my primary table. And that was before I set up the chemical log to be displayed as a collection on the pool detail list. I thought I figured out how not to use the duplicated tables but since deleting them, I cannot find my way back.
Another example of what I think is the same issue:
I have a work orders tab sourced by a work orders table. This table has a relation to the primary table of pools the same way the chemical log table does. What I want to be able to do is have a button on the pool’s detail page that will open the form page for creating a new work order (adding a row to the work order table). For now, I can only get the button to open a form page for adding a row to the primary table.
Please someone tell me how blind I am so I can move on lol
On the Pools details screen, you have a table collection called “Chem Log”. Could you add an action under “Collection item click” and set that action to “Show Detail Screen”?
Doing that opens the detail screen for only that particular row, which is only one entry in the log. I want to open a page showing the entire table, but only the rows with the same name as the pool I am currently viewing.
I suppose I could make a separate table for each pool’s chem log, and maybe a button or action would be easier to create to open that entire table, but I still don’t know how to do that, as currently, the Title bar actions drop down menu does not recognize any relations…
For some further explanation:
Here in the screenshot, I have selected the Chem Log table. The small table at the bottom of the screen is correctly showing the rows from my chem log table that are related to the row in my primary table with the same name. Why then, does setting the title bar action to “open detail screen” of “this item” open the detail screen for the pool, showing the information found in the row of my primary table, instead of the chem log table?
This second photo shows the screen that is opened upon clicking the button with these settings.
I have come up with a workaround. By creating a table dedicated to Auburn Hills Chem entries. I can “open new screen” to “Auburn Hills Chem Log”. I am also able to make the button open this table. I don’t love having to create a new table for each pool, since that is 70 tables that I will have to keep track of, but it works. I’ll also have to create a dedicated table for each Pools’ work orders if this is the only way to make the buttons work how I want them to… So that’s 140 tables… and 70 more for each function I will be adding.
And as for the work orders, if I have a dedicated table for each pools’ work orders, there will be no way to display ALL work orders on one page since it will be separated between 70 tables…
If you go the 140+ table route, that will be a maintenance nightmare because you also have to design 140+ separate screens and attempt to keep the design the same among all of them.
The Show Detail Screen action is intended to take you to a single row. You are trying to use it with a relation linked to multiple rows, so that’s why it doesn’t work.
You should be using a Show New Screen action for This Item and add a collection to that new screen sourced from your relation.
3 Likes
YES that’s it. I was just literally discovering this right now. I had started working on formatting the new screen from the “collection item actions” for the chem log collection on the auburn hills details page.
Now the question is: Can I somehow reach that same page by clicking the button above that collection labeled “chem log”? Currently, setting that button’s action to show a new screen based on “this item” opens a new screen that looks different from the one I formatted coming from the collection item action I mentioned above. If its not possible to get to that same screen, can I possibly copy/paste the formatting from the first navigation, to the buttons navigation??
1 Like
You can if you create a workflow which has the Show New Screen action. Then you should be able to call the same workflow from both places.
1 Like
Can’t seem to create a workflow to start with pool info list, and show new screen with chem log relation. Is it because of 1->many relation? doesn’t want to pull up many items?
If you take one of your existing buttons with the Show New Screen action that already does what you want…go to configure that action like you are going to change it to a different one. Then choose workflows and create new workflow. This will carry over that existing action into a workflow. Once you save the workflow, you should be able to access it elsewhere on the same screen or any other screen that is linked to the same table.
3 Likes