Hello everyone, I want to use this platform to my buisness. It is very comfortable and usefull to me, and I need your help.
How i can add the button or something like that to sort my table with data? I know how to sort or filter the data when i add “Collections”, but how to do that in reall time)?
Is there the opportunity to do the filter in real time, not on the page with “Collections”.
Thank you so much for this platform. I hope for an early answer)
For example. I wanna to sort by abc format.
If you don’t have many data, let’s say hundreds of rows, then you can use what we call a front sorting: You sort the table without requesting new data to your backend.
a. Select the content of your table and instead of binding it directly to the collection, bind it to a “sort” formula using your collection, the variable you just created and the field you wish to sort from. Like this
b. Add a workflow to the sort icon to toggle the sort order, and use the “if” function. Like this
If you have many data, thousands of rows, then you need to “refetch” the collection from your backend to get the data with the new sorting configuration. Depending on the “datasource” you chose and the mode you used (static, dynamic & cached) it can be slightly different. the easiest way is to select cached mode and then bind the sort with the variable you created before. Like this
when i added varriable “sort” to my table, nothing happens. It writes me “ReferenceError: sort is not defined”. The varriable is the same like you, also the steps.
It is my record of my screen.
yeah, i know it, i tryed to do like your example, but the result didnot change(
there may be a problem in my data or I am adding information to the table incorrectly.
Now varriable is working, but the data in the table doesnot refresh at all.
It doesnot refresh when I’m trying to do this step (1.a.) As i understand, it should be refreshed in real time, but the data disappears(
P.s. sorry for my language
Feel free to delete the test page! I just left it there so you can see it’s working and because I didn’t want to mess with your original page
A couple of things you might find helpful:
the formula is at the “Collection List level” because you want to sort items in that list
when you hover on a formula name, a short explanation of how the formula works pops up
In the case of this sort formula, you can see:
the first argument is the data from your collection, i.e. Example[‘data’]
the second argument is how you want to order your sort, ascending or descending. In a previous step, you defined a sort variable so you want to add that variable as the “order” argument, in this case, we had called it sortByLastName
the third argument is the name of the field you’re sorting in your collection, in this case, the column name is “Last Name”
It works)
But what if i wanna add sort to other columns?
I tried to do the same things (add workflow to other icon and complement the formula), but nothing happens with new sort and also the old one was broken.
Since you have 2 variables you want to change when the user clicks on each sort icon, you’ll need 2 actions in the workflows that trigger when the user clicks on a sort icon:
the first action will change the filterName variable to match the field in your database that you want to filter
In the screenshots, we’ve done this for the sort icon related to the “First Name” field. You would need to repeat the same action on each sort icon. The only thing that would change is the text you put in the first action.
Oh my God, thx so much. It is exactly what i’m looking for.
I’m trying to understand how to filter in real time? I know that it can be from Collections…(img.)
But what if i wanna do the Filter in real time?
For example - I wanna to filter my data by name or company name.
The easiest way to do that is with a dropdown select menu element. We’ve taken it out of the toolkit for now because it had performance issues but it should be fixed and live again in the next few days.
Would it be ok for you if I sent you a tutorial towards the end of this week or early next week?