Query parameter use

Hello Thanks for putting together a great UI service! I am having fun with AppGyver!

I am new and am trying to filter list items based on query parameters.

I have a page where I (repeated) list named items with the properties color and shape.
I would like to filter and display my list items based on item name, color, and/or shape values.
My current list has 14 total entries; my display list page lists only the 1st 10 in order to limit the amount of data uploaded (downloaded?).

I cannot seem to get the filter button to filter as I wish.

Rather than explaining in words, I have made some (unnecessarily large) screenshots and videos of:

  1. my previewed app not working:

  2. my (redacted) data configurator

I think my first (of many) problems (challenges?) is not knowing how the query parameter works- I can’t seem to get the GET COLLECTION to work properly in the data configurator using the query parameter.

Any help would be appreciated, thanks!

Hi, if you want to send a request with “shape=0”, your query parameter should be called shape instead of filter, and on the test tab you will give it a value of 0. Opening the network tab of Chrome’s developer tools will help you to see what kind of requests you’re sending :slight_smile:

Thanks for the quick reply and your advice Mari. I’ll get to work on it and let you know how it all turns out.

Hi Mari.

I wanted to update you on my progress.

To summarize, I have an app where users enter the following data: item name, color of item, and number of sides of item (for example, “sun”, “orange”, “0”).
I display the list of data to the user via data item in repeat.

I wanted the user to be able to sort the repeated list items by entering one, two, or three search items (item name, color, sides) and display the sorted list.
I was deciding between using a “url placeholder” or “query parameter” with the data configurator to do this.
I use Backendless as my backend.

What I ended up doing was:
I created 6 separate data sets on the data configurator: one for item search alone, one for color alone, one for number of sides alone, one for item + color, etc. (3! = 6)
I used “url placeholder(s)” and linked page variable(s) (search values) to each url placeholder.

I then made one of the 6 data sets “visible” by using formulas to show the appropriate data set in the data item in repeat.

Although this works, it seems very inelegant. If I had a list with 4 elements, for example, and wanted the user to sort based on combinations of all 4 elements, then my solution would require 4! = 24 data sets, and so on.

If you understand what I did, is there an easier way to do this?

Thanks again for your advice.


Hi, if I understand the case correctly, you could have a single list of all items and then use the SELECT formula to display the items that match your query using page variables that the user can modify.

So you’d have pageVars.color, pageVars.sides, etc. that are then bound to the value of e.g. a dropdown.

A basic query where the user can choose one value for each search criteria:

SELECT(data.Items, item.color === pageVars.color && item.sides === pageVars.sides)

To handle the filter being initially empty, you can use IF(IS_EMPTY(pageVars.color), item.color, pageVars.color) so the filter defaults to item.color === item.colortrue for each item if no filter value is chosen.

If you want to implement multiple-choice filtering, you could have a list pageVars.chosenColors and have tickboxes for each color, which trigger the adding and removal of a color to the list. Then the formula would change to:

SELECT(data.Items, IS_IN_ARRAY(pageVars.chosenColors, item.color) && item.sides === pageVars.sides)

Hope this gave you some idea on how you can move forward!

Thanks so much Mari! I will look your email over and work on things next week. Also thanks for your quick response- I still am amazed that you and AppGyver can provide a free service while also taking the time to understand my question and help people like myself.
Have a great weekend.

1 Like

Thanks for your reply
Let’s say my user data list that I want them to be able to filter is very long (say, 500 entries)
By doing what you suggest, will that load all 500 entries into the client-side device, then filter them?
I would like as a default to display only the last 10 entries entered on the client-side device, but be able to sort the entire 500 item list.
I tried to filter the 10-item displayed list and it only results in filtering those 10 entries, not the whole 500.

Hi, if you want to filter the whole list but only show the 10 first items, you need to pull all of it into data.Items, then do the filtering, and then choose the 10 first items from the list.

1 Like

Hi Mari.

Thanks again for your help so far.

I have run into a challenge that I can’t seem to solve- I would appreciate any help if possible.

Here is a summary of the issue (forgive my long explanation):

My app uses Backendless as the backend database. My app allows kids (identified by their “email”) to enter items they see in nature, their color, and their shape into the app. “Item” is the name of the item; “color” values are stored as the hex codes for the color, “shape” is stored as the number of sides the item has. So my data has columns of “item”, “color”, “shape” and “email”.

I assigned “point values” to each item’s “color” in a related table (colorpoints). So that table has “color” and “colorPoints” columns.
I assigned each kid’s “initials” to their email in a related table (“users”). So that table has “email” and “initials” columns.

I am able to retrieve all related data for each data object (color, item, shape, email, initials, colorPoints).

My goal is to:

  1. calculate the “colorPoints” total (the sum of all “colorPoints” values) for each child (identified by their “initials”)
  2. display this on UI as “initials” and “colorPoints” by descending value of “colorPoints”: for example:
    JHB 500
    REP 490
    KST 472
    and so on.

I went on to the Backendless Help Forum and got some ideas to get this far, but am at a standstill now.

Any help / guidance would be appreciated.

Thanks for your patience!

Hello, how are you
I’m learning how to use the AppGyver platform I’m taking the first steps and I need your help to create a calculator could you explain me how can I make it functional?
I’m racking my brain to learn the question of variables
if you can help me i appreciate it