I have a Missions table that has all possible missions and a Missions Log table that has submissions for those missions from various users. In the Missions Log table, I have a Boolean “Approved?” column.
Filter Missions screen so that only Approved missions for the logged in user show up.
What I can already do:
I can already filter that screen by whether or not the user has SUBMITTED a log entry for missions, but that only requires the user email and mission name.
What I can’t figure out:
How do I set up my Missions table so that I can filter by Approved (Boolean) status?
Yeah, there is a problem. That is not appearing on the Missions list because I couldn’t figure out how to port it over from the Missions Log entries. I also want to be able to add the Timestamp of the submission.
I got lost in the Lookup, Relation, etc. connections
Question: I assume that each Mission can have multiple log entries, yes? If that’s the case, how would you determine if any given mission is approved? Does all of its associated log entries need to be approved?
The log table has user-specific submissions for the various missions. The mission table just defines the missions themselves. It is the submissions that get approved, but when the user lists missions in the interface, he only sees his own.
I want to make 3 separate views: 1 for assigned but not submitted (or approved), 1 for submitted but not yet approved, and one for approved.
I will work on the screenshots, but the tables are now very wide.
I think you can leverage the Query column here. And then you won’t need that “temp_Mission User ID” column.
So in your Missions table, you could create a Query column that targets your Mission Log table and apply the following filters:
Player Email is Signed In User, and
Mission Name is This Row → Mission Name
Then you could use the Query column as the source of a collection on your Missions details screen, and filter it by the Approved boolean - either “is checked” (approved) or “is not checked” (not approved).
That will take care of two of your views. For your 3rd one, I assume you have a separate column in the Mission Log table that shows who it’s assigned to? If yes, you’d use that as an additional filter.
Yeah, it takes a while to get your head around all the computed column types, and how to use them effectively.
Relation: establishes a link between one row and one or more other rows based on matching values. A single relation returns the first matching row, a multiple relation returns all matching rows.
Lookup: used to fetch a specific column value via a relation. If used with a single relation, it returns a single value. If used with a multiple relation (or a query), it returns an array. Lookups can also be used outside of relations, for example to create an array from an entire column of data.
Query: basically relations on steroids. They allow you to create conditional relations by applying filters, and then sort and/or limit the results.
Single Value: Picks a single value from a column, relation, query. Has many uses. I won’t try and list them all now
I accidentally broke my mission submission process by deleting the form on the Mission detail page of the Missions To Do dataset. I got most of the fields working again except the current user email for the submission.