How to create dropdown from field

Hi,

I don’t understand why this issue is occurring for my dropdown box (see below). It should be a different option for each row unlike what is shown here:

image

For some context, here is the data field I created for it:

As you can see, I want to create a dropdown filter for today, this week, this month and this year, but this isn’t working right now.

And, here are the conditions I have set in the dropdown:

A dropdown works like this…

If you select Dynamic Choices as the choices style then you need to define the list of choices that the dropdown will display.

First you need to define the ‘type’ of data that it will display. (in your case
‘date’ which is a custom datatype in your app).

Then you need to define the ‘options’ it will display - in your case that is a list of ‘dates’ returned from doing a search for dates from your database.

Then you need to define what will be displayed in the dropdown for each object (each ‘date’) in it… (this needs to be a text for each dropdown item)

Currently, you’re defining that text as a (comma delimited) list of Time Category fields, returned from a search for dates, each item’s Time Category.

In other words, for each item in the dropdown, you’re instructing it do display all the Time Categories from all the Dates you’re searching for.

So the display will be the same for each item in the dropdown (i.e. a comma delimited list of all the Time Categories from the Dates in your database - This month, Today, This week, This year).

I’m not entirely sure what you’re intending to display in the dropdown, and can’t quite work out the concept of your data - but I’d guess you’re actually trying to display each Date’s Time Category?

If that’s correct, the your Option Caption should simply be This Option’s Time Category, so that each item in the dropdown (i.e. each ‘date’ is presented in the dropdown as the text value from that Option’s Time Category).

Hi Adam,

Thanks for your detailed explanation.

Essentially, what I am after is something like below (but presenting each of these as: today, this week, this month, this year).

As you can see, I managed to get this working, but the issue wasn’t able to access “current option’s time category”

The purpose of this dropdown is to filter a table on these dates - i.e. doing counts and sums over current day, current week, current month and current year.

If you have any other idea about how I could get the labels in that would be great.

Cheers

Sorted it out thanks :slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.