Hi All,
Looks like there is no session variable capability in Appsheet:
I wonder if I can solve my problem without it. See video:
Data model:
In summary, when the user clicks on a Class, I would like to set the selected class in a session var. Then when viewing Lesson Techniques, the status will be retrieved based on this session variable.
I tried the method 2 from Matt: Background Variable Table but it was too slow and too heavy on the DB.
I canโt find any alternatives other than creating a dedicated UX view per class to capture the context. This is clearly not a good solution since i will have to continually update the list of UX views whenever I add classes.
All almost as fast as I can press the buttons.
There is, however, a sync for each data-change I make;
You might investigate LINKTOFILTEREDVIEW()
, you might find something there that can help.
Hi Matt, Yes, Iโm using LINKTOFILTEREDVIEW() on the table Class to show related Lesson Techniques records on top of adding a new record on this workaround table Class_Card_Status_Mappings.
The problem is that I want the right Status to be displayed on the Lesson Techniques view.
So I added this heavy expression on the Status field:
INDEX(
ORDERBY(
FILTER(
"Class_Card_Status_Mappings"
,
AND(
[Lesson_Card]=[_THISROW].[Key]
,
[Class]=[_THISROW].[User_Profile_Session_Var]
)
)
,
[_RowNumber]
,
TRUE
)
,
1
)
Expression of virtual field User_Profile_Session_Var:
INDEX(SELECT(User_Profile_Session_Var_Classes[Key], [Device]=CONTEXT("Device")), 1)
Move this into a (slice)
You only need the following for the slice condition
[Device] = CONTEXT("Device")
From this, you can more efficiently call values from that record.
INDEX(Current_Session[Key], 1)
INDEX(Current_Session[User_Profile_Session_Var], 1)
If youโve got a table that collects these records, which essentially connect the Gym, Lesson Technique, and the User together, then youโll see a list of these records under each Lesson Technique.
What this accomplishes is it will create a unique filter, for each user based on the completed technique records theyโve entered into the system, for each Lesson Technique.
I have a record per class and technique (see status mapping table in the diagram). A Class is indeed associated to a gym.
These recommendations are great optimization but I actually canโt even make it work right now. Iโll get back to you tonight. Thanks Matt!
Perhaps this is your problem:
was able to solve it with this dirty trick: Hack to refresh virtual column on records from another table
User | Count |
---|---|
16 | |
10 | |
9 | |
8 | |
3 |