Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Field Values

Hi folks,

I need help with a case.

We have this table with data for ID, Descr and Date (the date field is actually the expiration date od the product and when the value is null our product is still active).

1

Item Α

2

Item Β

1/5/2013

3

Item C

4

Item D

1/1/2012

5

Item Ε

We need to create a list box which will contain only the active Item Descr and it must to work dynamically with all the selections.

For example:

When you select 2013 and the 6th month the Descr listbox must contains Description for Item A,C,E.

When you select 2012 and the 2nd month the Descr listbox must contains Description for Item A,B,C,E.

As you can see in the attached .qvw I have already reach the result but due to the selections  I always get the active products as excluded values. Am I missing something?

Thanks in advance,

Helen

7 Replies
salto
Specialist II
Specialist II

Hi,

PFA my solution. I have changed the script a bit to handle the blank date values.

Hope this helps!

Not applicable
Author

Hi Salto,

Thank you for your reply.

I appreciate your answer but the problem still exists. I know how to avoid nulls, the problem is that when you select for example 2012 although the field values are right the are represented in grey (which is correct because it depends on the selection). I am trying to find a way to make values represent as possible although the selected value in the Year fields might be different. It's a kind of logical issue which I am not sure if I could resolve it by using Data Island, Set Analysis or something else and that's exactly what I want.

Thanks a lot for your help,

Helen

salto
Specialist II
Specialist II

Hello Helen,

Sorry but I do not understand your problem. Active Items are not excluded from the selections like they were before, and your request is fulfilled:

When you select 2013 and the 6th month the Descr listbox must contains Description for Item A,C,E.

When you select 2012 and the 2nd month the Descr listbox must contains Description for Item A,B,C,E.

Could you please explain what I am missing?

Thank you.

Not applicable
Author

Eleni,

I did not open your qvw because I have the personal Edition

Create a listBox

where you create your Expression. In field, tab General

The expression if sth like: if(alt(MyDateField, Today() ) =< $vChosenDate), Item)

Alt() is a function that returns the second argument if the first one is null

Item must be related to MyDateField

where vChosenDate is a variable like :  =YourDateDimension

Fabrice

Not applicable
Author

Salto,

Sorry for the misunderstanding.

When you select 2012 and Feb it suppose to return all products that have not been expired, it supose to return Item A,B,C,E. Although, when I select 2012 and Feb I get the currect items but in grey background color which means that are excluded values from my selection. Please check the attached file.

Regards,

Helen

Not applicable
Author

Hi Aunez,

Thank you for your reply but there is an error in your expression

Noname.png

Not applicable
Author

Yes, sorry

I have written too fast: I have modified my answer

Fabrice