It is currently 21 April 2025, 16:39 Advanced search

Value List dependent on another field.

Questions and answers on how to best use Instant Developer

Value List dependent on another field.

Postby Ted Giles » 22 June 2021, 13:16

Another silly question, but I have tried several options and not managed to do this;

I need a Value List which only contains the Distinct Company where a Date field in the same table is not null

Value List based on a Company
Select Distinct
Company
From
Table One

This works OK

Value List based on a Company AND where data exists in another field is my problem
Select Distinct
Company
From
Table One
Where Date_in field is not null

Can't get it to work.

Any propmpts or ideas?
User avatar
Ted Giles
 
Posts: 590
Joined: 29 November 2013, 12:58
Location: The Wolds, Lincolnshire, UK

Re: Value List dependent on another field.

Postby john w » 22 June 2021, 13:39

Does the field 'date_in' actually holding a null value or is it simply empty. Since 'null' is a value and if its not actually in the data that perhaps be the issue.
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Value List dependent on another field.

Postby Ted Giles » 22 June 2021, 15:41

I have tried the options of;
Date> 01/01/1900
Isnotblank
Isnull = false

Got nowhere John.
It's obviously a syntax issue.
User avatar
Ted Giles
 
Posts: 590
Joined: 29 November 2013, 12:58
Location: The Wolds, Lincolnshire, UK

Re: Value List dependent on another field.

Postby john w » 23 June 2021, 14:53

try date <> ''
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Value List dependent on another field.

Postby Ted Giles » 23 June 2021, 18:06

Nope
User avatar
Ted Giles
 
Posts: 590
Joined: 29 November 2013, 12:58
Location: The Wolds, Lincolnshire, UK

Re: Value List dependent on another field.

Postby ljwilson » 23 June 2021, 19:17

try:

not(isnull(date))

...jack
ljwilson
 
Posts: 783
Joined: 26 November 2013, 14:15

Re: Value List dependent on another field.

Postby Ted Giles » 24 June 2021, 9:21

InDe1.jpg
InDe1.jpg (42.34 KiB) Viewed 2553 times


That worked well, Jack.
Where I was going wrong, was assuming that the panel had inheritance for the Selection at launch.
So my panel filter/selection is where Dateout is Null. This displays properly.
In the Value List, adding Not.isnull(datein) picked up everything. I was assuming that the existing filkter was active and it isn't.
The answer seems to be to put both tests into the Value List as my image above shows.
User avatar
Ted Giles
 
Posts: 590
Joined: 29 November 2013, 12:58
Location: The Wolds, Lincolnshire, UK


Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 22 guests