Product(s): | ProjectWise Explorer Client | ||
Version(s): | 08.11.11.559 | ||
Environment: | Windows 7 64 bit | ||
Area: | Document Code | ||
Original Author: | Arturas Baranauskas, Bentley Technical Support Group |
Sometimes users might need to add a additional query to an already existing one that is being used to populate a value select list in the ProjectWise.
In this scenario we have a already existing query that returns a list by filtering it trough filter attribute and a form value(filter and some_attribute) it returns us a list, but we need to have a fixed amount of values added to a list that can be accessed by using another filter value.
So if original query(Select name, description from env_table_name where filter = ‘filter name’ AND some_attribute = '$EDIT#Attribute1$’ ORDER BY sort_attribute) would return:
Value 1
Value 2
Value 3
And additional
query(Select name, description from env_table_name where filter = ‘some value’ ORDER BY sort_attribute)would return:
Test1
Test2
Test3
The end result we are going for is:
Value1
Value2
Value3
Test1
Test2
Test3
How to combine two select queries to return a single list in ProjectWise attribute form:
We could use UNION operator but this is a rather highly depending on format and might not work at all so the best way to go around in this case is to use OR operator:
SELECT name, description from env_table_name where filter = ‘filter name’ AND( some_attribute = ‘$EDIT#Attribute1$’ OR filter = ‘some value’) ORDER BY sort_attribute