I’m trying to create a filter for a set of data that contains scores. I want to be able to filter for a score (number) is =, >, <, >=, <= “some number”. I’m sure there must be a way to do this but I’m not very good with the formulas, variables and could use some help. I imagine this is something others would benefit from. Thanks!
Hi Brandon! You can use the SELECT formula function to filter your data. Check out the documentation with examples here: https://docs.appgyver.com/reference/formula_functions/list/select
This sounds easy enough, but I tried and had no luck. I’m configuring a repeatable list to show only visible like this:
Unfortunately, when I view the list it is blank. What I would really like to do is instead of setting the score to “10”, to instead have it refer to a page variable that the user can change with an input field. This way it would sort however the user chooses.
Hi Brandon,
Instead of toggling visibility based on a formula, you can filter the data to be shown using SELECT (this won’t alter the data). Here’s a quick example with a country list, where I filter the list based on the value of pageVars.populationLimit
, which is bound to an input field on the page.
Here’s the input bound to a page variable:
Here’s where I place the SELECT formula:
And here’s the formula:
In your app, the 2nd argument would be something like item.company_score > pageVars.scoreLimit.
Input on this that may help someone
Put your data into two page variables.
Then in you logic simply add an if condition and bind to a formula.
Formula example is simply
pageVar1 <= pageVar2
Output is true or false based on this.