Dynamic filtering based on data

Hello,

In my project, each user can set a set of goals, from 1 to X. Each goal has a dedicated showing various information.

I use a “select” component which is bound to a collection of data, so that each user only sees its goals, as below.
image

Now what I would like to do is that whenever a goal is created, all the data fields within the page display the information related to this goal.

For example, here it should show an amount:
image

I looked at this video: Dropdown Elements Update and tried to replicate the logic as seen below
image
image

But still nothing is shown on the field. Does someone know what I did wrong?

Thank you!!

Hey, can you give us a little bigger picture of how this screen looks so that I can better understand the context?

Hi @luka ,

Thank you for your answer.

This is the entire screen of the page. On the top left, the user can select a goal, here “Startup” (but it can be any other he/she set up) and then all information underneath, being the progress bars, the text under “Deadline”, “Return”, etc. should change. In this case I try to change to have the text under “Monthly contribution” (here in green)

All these information are bound to the same data collection which is successfully fetched but for some reason it does not display.

I hope I was clearer. Thank you for your support.

Good evening everyone,

I spent the weekend on it and finally made it. I will put the solution if someone ever faces the same problem, I hope it helps. :call_me_hand:

The idea is to use a combination of a lookup and getkeyvalues formula. You can see the explanation in this video from Weweb https://www.youtube.com/watch?v=bXRSGLh_9H4 that helped me crack it.

Great! Sorry for being late in responding, quite a busy weekend and the week

Hi Luka,

No problem I understand we are many asking for help, it’s already nice of you to take time.

Quick question as a follow-up as there is one I can’t figure out, unfortunately.

image
I’d like to display the content within “Strategy” i.e. “US Economy” but it comes as an object. It comes from an array, within the array (collection) I’m already getting my data from. I tried a few things I found on “nested” objects (if it’s the right term) but could not manage to make it work.
What do I do wrong? Thank you !

If you want to get the 'US economy" text from the current value what you should do is either:

a) Do another getKeyValue

b) Add .Strategy at the end

Or are you looking to do something else?

1 Like

Hi,

Thank you. I tried both with various options but must miss something. Do you see where I got it wrong?

  1. GetKeyValue
    image
    image

  2. Add .Strategy at the end
    image
    image
    image

Ah, its an array

You can add [0].Strategy instead of just .Strategy

1 Like

Annnd it works ! :call_me_hand: :partying_face: :partying_face:

Hi @luka

I hope you are well. I have a follow-up question here so I re-open the topic.

I have a data table on Xano whereby for each year, there is a given amount , e.g. 2027 => period= 18028 and progression = 0.45

Now on my WeWeb page I’d like that when I select a given date (1) e.g. 2027, the progress bar (2) takes the value of the column progression, i.e. here 0.45

Based on our previous conversation I have done this but it’s not dynamic with the date.

Would you know how I can make it? Thank you!!

Are you refetching the collection on change of the year?

Hi @luka !

It’s solved thank you. The solution was to work with 2 “filterbykey” to get the collection where the years-related values are stored.

Wish you a nice weekend