Cancel
Showing results for 
Search instead for 
Did you mean: 

Variable that can have value, be empty or NULL

Creator
Creator

Hi all,

Is it possible to make a query in query builder where one parameter, like Alternate_ID can have a value, be empty or null? I try to do it with the = assigment and without any default value, but when the user launch the search, if he/she doesn't introduce any value is equal than *, and if he would a null or empty value I don't know what is needed to introduce...

Regards,

5 REPLIES

Re: Variable that can have value, be empty or NULL

Legend
Legend

You could acheive this with Simple Search.

 

Regards,

Richard

www.prospectplm.co.uk

Richard Bennett
PLM Consultant
Prospect PLM Ltd

Re: Variable that can have value, be empty or NULL

Creator
Creator

and how? because I know that * means all, empty means all too... and for empty or NULL value?

Regards,

Re: Variable that can have value, be empty or NULL

Legend
Legend

with simple search you can have:

NULL

NOT NULL

CONTAINS

=

!=

and you can you can use '?' for characters.

 

you can also use AND & OR logic, see attched screenshot.

Regards,

Richard

Richard Bennett
PLM Consultant
Prospect PLM Ltd

Re: Variable that can have value, be empty or NULL

Creator
Creator

sorry, may be I don't express myself properly...

I would like to have a property than in query builder are defined as = because in a user's search I would like to select if this variable have a value, be null or empty. 

On the other hand, with your suggestion, simply the variable accept all the values, and I would like to focus only in one. 

Regards,

Re: Variable that can have value, be empty or NULL

Legend
Legend

Teamcenter query builder is bit limited in that regards.

 

There is no easy way of writing query (using query builder) to search for values that can be non-empty, empty, or NULL.

 

Writing query to search for non-empty values is very easy. But to search for NULL values, you have to add it as default value in the query. There is no easy way of differentiating values that are empty v/s NULL.

 

You will be better of writing an ITK program for such searches.

---

Thanks and Regards

Yogesh Fegade