Inside a RG, how can I select 5 rows above the one I clicked?

Hi, I find a lot of help to learn this BUBBLE system.
Thank you all.

Should I set a custom state to save in a variable 5 rows that are before (or next) than the one that was clicked? how do I proceed?

Example by clicking on line number 10
should lines 5/6/7/8/9 change color? Thank you

You can do a conditional in the RG:
Assuming you’re storing the clicked cell’s index in a state (i.e.: selectedindex) - you set up the boundaries like this:

1 Like

Hello and thanks for your support, I solved my problem and everything works very well… in the same way I also added the function to change color to the next 5 cells… but however it initialized me with the first colored cells and I set a new one condition so if index <1 then no background. :wink:

I would like to learn how to use all these functions and I would ask you to be kind enough to explain to me in detail the condition you suggested, so that I can understand it well and be able to use similar conditions later.

I repeat, it works perfectly, but I would like to better understand the meaning of each individual part of the function, thanks again

You’re welcome.

I didn’t understand this part, but great! If it works for you, it works. Though I don’t think you can get a selected index to be less than 1… Perhaps you should revisit that.

You set a state to indicate which cell was clicked/is active.
The conditional is two parts, each a boundary.

  1. If the current Cell’s index is 5 less than the selected index or more, conditional is true (change color or whatever you want)
  2. If the current Cell’s index is less than the selectedIndex, conditional is true (so any cell starting at the selectedIndex or higher won’t be true)

That’s really all there is to it. Cheers!

Hi thanks for your details… :pray:

Can you help me with this issue? thanks again

This topic was automatically closed after 70 days. New replies are no longer allowed.