Greetings,
Three tables/Slices at work here
Session (Table)
โObjective assignments Sliceโ (Slice) Sourced from table Objective assignments
Objective utilization (Table)
I have a view โSessionsโ
For recording session information
It has a Key โSessions IDโ
A few columns of data that you entered data/time
and a Virtual Column that links to a slice called โObjective Assignments Sliceโ
This displays all Objectives for the client for whom I am recording the session.
I have an action assigned to this slice so that that when I click on an item from the list displayed in the session an action is triggered (LINKTOFORM(Objective utilization,columnname,value,columnname,valueโฆ)
Within that LINKTOFORM I can pass values from Objective Assignments Slice with no problem.
What I cannot figure out is how to pass the value for the Sessions ID from the main session view so that in the โObjective utilizationโ I can auto populate the Session ID along with all the other values I need.
It is the only one I cannot manage.
I cannot use MAXROW because I may need to edit the information after creating new ones.
Thanks in advance.
Solved! Go to Solution.
Eureka,
I finally got a working solution. It has a few twist and turns but it works.
Step 1
Add a T/F column to the Sessions Table called โSessionActiveโ
Step 2
Create a series of actions for the Sessions Table
โ Action 1 Set Value The column โSessionActiveโ to False
โ Action 2 Search for all Rows in Sessions that have the Value True in the column SessionActive"
and then run Action 1 for the Results
โ Action 3 Set Value The column โSessionActiveโ to True
โ Action 4 Go to another View in this APP =LINKTOROW([_THISROW],โSession Detailsโ )
โ Action 5 Group of Actions I this Order: Action 2, Action 3, Action 5
Step 3
On my Sessions Deck View and Under Behavior โ Events --Row Selected assign Action 5
Step 4
Create an Action for for the table โAssigned Objectivesโ
โ Action 6 Go to another View in this APP =
LINKTOFORM(Objective Utilization_Form,
Objective Assignment, [Objective Assignment ID],
Session,(LOOKUP(
true,
โSessionsโ,
โSessionActiveโ,
โSession IDโ
)))
Step 5
Go the โAssigned Objectivesโ table view that I have and Under Behavior โ Events --Row Selected assign Action 6
Now I can select a session
See the session details with a virtual column that list all of the Assigned objectives.
If I click one of those โAssigned objectivesโ A new form for โObjective Utilizationโ is opened up that already has the correct
โSession IDโ, and โAssigned objectives IDโ. I enter the rest of my data and click save.
I even added some logic so that when I save the โObjective Utilizationโ and return back to the Session Detail view that Assigned objective is no longer present on the Virtual Column list so all I see are the ones I have not yet done.
I just hope that this will work even when I am offline and that I am not going to slow the App down with all this.
Thanks to all those who reached out to help and let me know if I over complicated this.
For now I am going to make some tweaks and try it out on my phone.
Hi @Mark_Taylor
Could you please update if Objectives Assignment Sliceโs table child table of Sessions table?
Edit: From the title of the post ,it sounds that Objectives Assignment Sliceโs table is child table of Sessions table.
So I believe you will be able to pull session ID in the child table. I believe then you can use it in LINKTOFORM() like other columns?
The Sessions has a virtual column that runs the following App Formula
โSelect(Assigned Objectives slice[Objective Assignment ID],true)โ
The Form View of Sessions does not let me run the Actions on the Virtual column "Objectives "
The action is run when I click on them from the sessions Detail view
I count four tables/slices, not three:
Keys are parts of tables/slices, not views, so I assume Session ID is the key column of the Session table?
which appears to be:
Is Assigned Objectives slice the same as Objective assignments Slice?
Objectives is the name of the virtual column mentioned above?
Virtual columns cannot be modified by actions or by users in forms.
Actions cannot be performed within form views.
Since Objective utilization is a different table, youโll need a separate action to affect it; you canโt affect Objective utilization from a LINKTOFORM() expression that targets Objective Assignments Slice.
You are correct, I just discovered AppSheet a week ago and I am still getting familiar with the terminology
You assume correctly.
Yes swapped words in my typing
I realized this while creating the Sessions Form.
My solutions was to have a multi steps
1 Add a new session with the โSessions Formโ and initially just gather Client, Date,Time.
2.Clicking Save takes you into the Details View where the Objective assignments are displayed
My Goals is to have clicking an Objective open a Form that already contains the โSession IDโ, and โObjective Assignment IDโ.
I am trying to find a way to structure actions to accomplish this.
Rabbit Holes I am currently going down to find a solution for this:
โI thought about a action that temporarily assigns the session ID to a โ_Per User Settingโ and then clears it
โCan a default value Expression pull a value form a previous/parent view
I thought about making Objective utilization[Session] default value equal MaxRow of sessions.
This would be fine for initially recording but I if I go back to make changed a few day later then the Session record in Question Would no longer be the max row.
I apologize If my terminology as inaccurate. I have only been at this a week and I am still learning
Thanks
Iโm having a really hard time trying to grasp what your app is intended to do. Iโm confident what you want to do is possible, but there are too many holes in my understanding to offer concrete suggestions.
Sessions of what?
Objectives for what?
Assignments of what to what?
Utilization of what, how?
I have therapy clients
I have a pool of hundreds of potential objectives to work on with a Client
An appropriate subset of maybe 50 are Assigned to the Client
When the therapy session occurs with the client not every objective will be addressed maybe 10 of the assigned 50.
I want to record the session details and record information about just the 10 Objectives that were utilized (addressed) during the session
The clients are assigned Objectives to be worked on during therapy sessions
My current methodology within the app is to create a new session From Form and then go into the Details view the session that was just created
There in the Details view of the session I see a Virtual column List of the 50 Assigned Objectives
Clicking one of them triggers an action to open a form to create a utilization of the Goal
This Utilization form Form Has the Following
Utilization ID | Session | Objective Assignment | Data | Notes |
---|---|---|---|---|
Key | Ref | Ref | Text | Text |
Launching the action (LinktoForm) from the Objective Assignment easily passes the Objective Assignment
I need to find a way to pass the Session to the form as well.
Thanks
Thank you for the additional details!
I see two ways to approach this: an easy way, and a not-so-easy way.
With the easy way, instead of choosing the objective from the session detail page, open the utilization form from the session page (using LINKTOFORM() and passing the session ID) and choose the objective from a dropdown menu from the utilization form.
The not-so-easy way involvesโฆ As I think about it, Iโm not sure I even want to suggest it, because itโs pretty complicated. Consider and maybe try the easy first? If that doesnโt work for you, then we can talk the hard way? The hard way involves at least another slice and perhaps even another table.
Currently I am trying this out
Right now I am just building the actions โฆThen I have to figure out how to get them all to execute properly
Adding a column to Sessions called โTempObjUtilIDโ
Have LinktoForm Just set a placeholder value for Session โSessionABCDโ
Action for sessions to set the value of [_thisrow].TempObjUtil to a Lookup in
โObjective Utilizationsโ of value of โSessionABCDโ in the Session column and return the value Objective Utilization ID
Action for โObjective Utillizationsโ to set the value of [Session] do a lookup in Sessions for in column
โTempObjUtilโ of the current ID and return the โSession IDโ thus changing the
โSessionABCDโ to the actual session ID value.
Remove value from Sessions[TempObjUtilID]
This may be a chicken and egg situation but I will advise if I am successful
Thanks
Eureka,
I finally got a working solution. It has a few twist and turns but it works.
Step 1
Add a T/F column to the Sessions Table called โSessionActiveโ
Step 2
Create a series of actions for the Sessions Table
โ Action 1 Set Value The column โSessionActiveโ to False
โ Action 2 Search for all Rows in Sessions that have the Value True in the column SessionActive"
and then run Action 1 for the Results
โ Action 3 Set Value The column โSessionActiveโ to True
โ Action 4 Go to another View in this APP =LINKTOROW([_THISROW],โSession Detailsโ )
โ Action 5 Group of Actions I this Order: Action 2, Action 3, Action 5
Step 3
On my Sessions Deck View and Under Behavior โ Events --Row Selected assign Action 5
Step 4
Create an Action for for the table โAssigned Objectivesโ
โ Action 6 Go to another View in this APP =
LINKTOFORM(Objective Utilization_Form,
Objective Assignment, [Objective Assignment ID],
Session,(LOOKUP(
true,
โSessionsโ,
โSessionActiveโ,
โSession IDโ
)))
Step 5
Go the โAssigned Objectivesโ table view that I have and Under Behavior โ Events --Row Selected assign Action 6
Now I can select a session
See the session details with a virtual column that list all of the Assigned objectives.
If I click one of those โAssigned objectivesโ A new form for โObjective Utilizationโ is opened up that already has the correct
โSession IDโ, and โAssigned objectives IDโ. I enter the rest of my data and click save.
I even added some logic so that when I save the โObjective Utilizationโ and return back to the Session Detail view that Assigned objective is no longer present on the Virtual Column list so all I see are the ones I have not yet done.
I just hope that this will work even when I am offline and that I am not going to slow the App down with all this.
Thanks to all those who reached out to help and let me know if I over complicated this.
For now I am going to make some tweaks and try it out on my phone.
User | Count |
---|---|
43 | |
26 | |
24 | |
14 | |
12 |