I get a few issues like this. I am clearly missing a concept somewhere.
I have tab for clients. I click a client to get a dashboard of that client with a number of collections on it. One collection is for “Actions”.
Actions can optionally relate to an Objective. When I edit an action, this works fine. I have a choice drop down populated by Objectives with a filter on where objective:ciientID matches clientID from the current screen.
However, this doesn’t work on the add form. when I add the same filter the choice element disappears and data inspector shows no objectives found.
it looks like the “screen” variables of the add action pop-up relate to Objectives rather than the client.
I don’t understand that logic (edit action keeps the context as the client, add action changes the context to objective). Especially as I can still output client record values to the form, just not the choice component.
Can anyone suggest how I can access the right rows, or what I am doing wrong?
I’m not quite visualizing what you are trying to do, but when you are on an edit screen, you are attached to an existing row. When you are on an add screen, you are not attached to a row.
In some cases you can access values from the parent row that the action was attached to open the add or edit screen.
In some cases, you may need to use screen values in your filter.
sorry, I didn’t explain that too well, but I am struggling to. I think you have understood it though. I’ll put a slightly clearer explanation below as a quote, but you can probably skip it.
Based on your answer, I assume the Edit is pulling the ClientID from the existing ACTION record as you desribe. That makes sense then. I guess the question then becomes, is there a way to pull the value from the parent (client) record? I think that is the problem I am having in quite a few places - which might mean I have structured something badly.
The item I am adding/editing is ACTIONS from the CLIENT screen. Every ACTION is related to a specific client.
An ACTION can also be related to an OBJECTIVE. OBJECTIVES are also related to a specific client.
It is OBJECTIVES that I am having problems displaying.
This works
View CLIENT screen. Edit an ACTION from that screen and select from OBJECTIVES relating to that client.
This doesn’t
View same CLIENT screen. Add an ACTION, I cannot show the filtered list.
So, it turns out that I had missed an important point about how relations work. I’d never quite grasped the point in the multiple records matches. I do now. That’s actually rather clever.
I need to use Glide more regularly. I only have one project I am building on it and I dip in and out. I haven’t internalised some of the key concepts still and it is so long since I worked though the university that I miss a lot of big concepts like this.
Good new though. This unlocks about 7 issues i was blocked on, so I should be quiet for a while. Thanks so much.
EDIT : 30 minutes later and I want to restructure my whole app!