Auto Update table

Hello there,

I am developing a new app where I need to show in real time.
Here is an example: imagine that I have around 15 items that need to be shaken, and each one has a diferent interval to be ready.
I need to show in real time, or update this table in each 30 seconds to inform the user wich product is ready, wich is still being shaken and wich is not ready within an App.
Since this products may not be the same in every day’s work. So I need a dynamic way to compare the begin date&time and the finish date&time of all elements on the table.

Here is an example:


By compairing the finish date&time with the current date&time, I need to update the status color and txt .
This table will be used to show the operator wich products are ready to use in real time.

hello @Oshiro!! great question, thanks for posting.

there are multiple ways to check the start date and end time vs. the current time to update the status for the products in the Table.

i’ve built a little demo that checks the Current Data & Time vs. the fields in the Tulip Table and updates the status in the record on a Button click:

Table:

Trigger:



Result:

in this case, the check is done on a button click but can just as easily be done on a 30 second timer as you mention. does this help you build what you’re trying to??

let me know if there’s something I can help clarify!!

gio

Hi Gio.

Imagine that my table has more than 20 items. I would have to prepare more than 20 triggers to check each one of them?
I was hopping that I could run all my table lines checking the end time and current time and auto update the status collumn.


Is there a way where I can compare the current date and time with all finish date and time in a table and change the color status based on the result? Like :
if (fisnish date and time < current time) then change status color to green
else if (current date and time is between begin and finish) then change status color to yellow
otherwise change status color to red.

hello @Oshiro,

you can also use an Embedded Table (https://support.tulip.co/en/articles/3715093-displaying-interactive-lists-of-table-records-or-connector-output-in-apps) within your app, and filter out all the records that do not meet the criteria you define. for example:

embedded table:


filter:

result:

will this solution work better for you??

Almost.

What I need is a way to make this trigger to all table records at once instead loading a placeholder and configure a trigger to each item.


Another thing, this table will not have always the same table records, so I do not want to have to manage many triggers every time I include or exclude a record of my table.

hello @Oshiro,

to perform what you’re describing a feature to simultaneously update multiple table records is required, which is a feature we plan on adding.

keep an eye out on product releases from @jacobdupuis in https://community.tulip.co/c/announcements/12 or reach out to @kevin.kononenko if you have further questions on this feature.

in the meantime, do the two solutions mentioned above help you achieve what you’d like??

gio

Sure,

Any tips are welcome and help.
I will look forward to this new feature, meanwhile I believe that I will have to mannualy meka all the triggers one by one for each table record.

Thanks!

1 Like

Hi @Oshiro,
Probably to prevent any duplicate triggers, you could use a kind of “loop” behavior to update all of your records.
Currently, the way to perform loop on tulip is not automatic and you are blocked when you have to made more than 10 loops.
Fortunately, you can use a double, tripple,… actions update to increase you “automatic update capacity”

Hi @mathieu.rey,

Could you help me giving me an example of how I can make a loop?
I already looked into it, but I didn’t find anything about it.

Thanks

Hi @Oshiro,
In order to simulate a loop, you must use two steps (on two screens) :

By switching between this two step, triggers should decide if you need to do a additionnal loop.
See an example :
ezgif.com-video-to-gif (1)

1 Like