Calculation/Relation with previous (list) data in inline list? Global var?

Hey!
I do have a problem with calculation and selecting the right values. I tried a lot with relations, lookups but did not achieve what I was looking for. Basically I do have a

  • Users table (row owners enabled)
  • Child table (row owners enabled and linked by email to the users table)
  • Products table (not linked)

Attemp 1 - preffered!
I want users to navigate through products and then do a calculation with the products data on the selected childs row. I guess it’s good illustrated in my demo app.

Attemp 2 - not preffered but working
I think it’s possible to use user-specific columns in the Products table and do a relation with the Childs data (but I do have a 1:n relation). Additionally, I think it’s not performant to do a calculation for each Product (about 500) with thousands of related childs. Therefore I was aiming to store the calculation fields in the Childs table.
The Products data are stored in a Google sheet and I don’t want to blow it up or ran into performance problems like this: App doesn't work with 65k rows of data
Even thought I think user-specific values are stored separately in a glide table.

Or is it possible to store the currently selected product in a global variable and link this later on to the child row?

Thanks for helping out!

Possibility tomorrow will check your work, but a kind of situation like that i solved using a temporary table (with just user specific columns, except the key).
I called it “lastclick” and the key is “1” then you can access from anywhere {you just need to create a template with the value “1” and used as a key) and store data that you can retrieve easily from anywhere.

I hope ive correctly understood your need of a global variable.

1 Like

Hi Mikahel, thank you. I was not able to follow your instructions… so can you maybe share a basic app how you achieved the “lastclick”? Thanks a lot!

Hi Stefan,
here you can watch the explanation, hopefully is clear enough, and on the following link you can copy my market application to have a look as I did

Best regards

Ps: in the video I called you Perez, confusing you with @SantiagoPerez :face_with_hand_over_mouth:

1 Like

Hello Mikahel,
you are a genius. Thank you very much! :clap:
I have only one problem: it works in your “karter” app. It also works in my “demo” app. But unfortunately not in my production app. I spent a whole night trying to fix the error, but finally i think it has to do with the table origin. That means: If both tables are Glide tables, then the “set columns” function works and writes a value to “lastclick”. However, if the original list table is based on a google sheet, then no value is written to the “lastclick” Glide table by the created action.

Maybe you can verify this? And if so, we can report this misbehavior to Glide.

Best thanks for the support!
Stefan aka Perez :wink:

1 Like

Thank You Stefan
My application is based on Google sheet only and it is working, but for some reasons in some cases are not working, recently I’ve already instructed Glide about this bug (you may find it on the forum under the post “who has the same problem of mine?”.
So, this is under investigation from them.
You may add your note too under the same thread.

Regards

1 Like

I’ve come to the same conclusion.

“if the original list table is based on a google sheet, then no value is written to the “lastclick” Glide table by the created action”