cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Getting query to return even with null (empty) valued attributes

cswaner
10-Marble

Getting query to return even with null (empty) valued attributes

Greetings,

This may be a stupid question, how can I get my query to return results even if one of the attributes has no value?

 

I have a query that works fine until I ask it to select and attribute where the value is empty.

 

Thanks for the help,

-Cam

8 REPLIES 8
kpritchard
12-Amethyst
(To:cswaner)

Are you joining different types on one of the potentially null attributes? If so try Outer Join Against.

Otherwise, maybe it's the Criteria?

Keir,

Specifically, I am trying to get a string value from a part for a specific attribute.

So, in "From" I add wt.part.WTPart, wt.iba.value.StringValue, and wt.iba.definition.AttributeDefinition.

Then, I join String Value to Part via ibaholder reference

Then, I join Attribute Definition to String Value via Definition Reference

I also have outer join between the String Value and Part.

I select the value from the String Value and set the criteria to only pull the attribute definition name for the specific attribute.

This works fine until I choose a part that has no value for the string. Something to do with the Joins?

-Cam

kpritchard
12-Amethyst
(To:cswaner)

If you're only after IBA values, then you should be able to Select from the WTPart. (IBA's should be an available attribute of WTPart when defining the Select).

If you keep the other types in the Query, then I would play with the Outer Join Against to allow null values.

Cameron,

joining types in Windchill is quite difficult to understand.

Last week I had a couple of days of training with a PTC consultant on query builder, so I can give you some advice.

Not all types of object could be join directly.

If you want to know something about, you have to enable Customization Icon in the navigator bar1+-+Customization+Tools.PNG

Then pick Tools and select Modeled Objects.

Now in the Column Descriptors you can do a Search in table with the type, for example Wtpart.

Once you have found your type, select Information, Java Information tab and finally UML Diagram.

2-+Modeled+Objects.PNG

Marco

Marco,

Is there a way to control who has access to the Customization Utility?

-Cam

Cameron,

as you can see in the first image attached to my previous comment, you have to be site admin to enable the preference.

Other roles cannot.

Marco

We only turn the Customization tab on in our non-production environments.

I think I have the joins figured out, however, when in the case where one of the attribute values is empty the entire report is blank.

From what I can tell, this should be resolved by using outer join. I think there is a problem with outer join and I have logged a case with tech support. We are on 10.1 m010.

-Cam

Announcements


Top Tags