Changes

Dynamic Selective List (Client)

1,994 bytes added, 09:57, 26 November 2021
The values are then used as inputs for the filter query (configured on the property being edited) according to the [[#Dynamic_selective_list_criteria|dynamic selective list criteria]]. From there on, the item resolving process becomes identical to [[Offline_Query_(UBIK_WinX)#Offline_query_criteria|offline querying]].
{{Hint|Specially Specifically speaking, the multiple values are used with a [[Offline_Query_(UBIK_WinX)#Value_range_criterion|value definition of "in a collection"]] during the querying process, effectively applying them in a "logic or" relation. Like in the [[Offline_Query_(UBIK_WinX)#Single_value_criterion|general offline query feature]], individual string values are compared using string contains whereas other types are compared using equality.}}
=== Dynamic selective list criteria ===
* DEPENDENCY_PROPERTY_NAME: The name of the property whose values determine the dynamic selective list items.
* QUERY_CRITERION_NAME: The name of the property that the resolved dependency property values should be filled into for querying.
* IS_MULTI_VALUE_STRING: (Optional) Whether the value of the dependency property should be interpreted as multiple string values separated by ";". Defaults to false. Additional note: Currently, values specified in a multi value string are only considered as strings. For example, "1;2;3" will be considered as strings "1", "2" and "3" and used in the query as such, resulting in finding items having their corresponding property values containing any of these string values.
* IGNORE_NULL: (Optional) Whether null dependency property values should serve as a filtering criterion or be ignored. Defaults to false.
 
{{Hint|The data type of the DEPENDENCY_PROPERTY_NAME'd property should match that of the QUERY_CRITERION_NAME'd criterion so that the values can be used. Otherwise, that dependency property is ignored and [[#Data_hierarchy|item resolving algorithm]] will continue looking up the data hierarchy.}}
 
== Example use case ==
[[File:Client_DSL_Example_Usecase.png|220px|thumb|border|alt=Example use case|Example use case]]
In this example, two properties "Model Guid" and "Part Guid" are associated with a dynamic selective list each.
* "Part Guid" depends on a property "Types of Parts" and uses DSL_Query "Part Query" to find the suitable dynamic selective list items (parts).
** From the data hierarchy, {{UBIK}} extracts the "Types of Parts" values. There are many factors that can affect which objects {{UBIK}} takes the values from, see [[#Resolving_dynamic_items|resolving dynamic items]] for details.
** If for example, the final "Types of Parts" value found is "Mechanical", the query will return all those "DSL Item Instances" that are "Mechanical", e.g. "Screw". The user can then select one of those items and its Guid will be set as the value of property "Part Guid".
* "Model Guid" depends on a property "Part Guid" and uses DSL_Query "Model Query" to find the suitable dynamic selective list items (models).
** Similarly, {{UBIK}} tries to find the "Part Guid" values, which can be found on the object itself in this case.
** If for example, the final "Part Guid" value is the Guid of item "Screw", the query will return all those "DSL Item Instances" that are "Screw", e.g. "M1.6". The user can then select from those just like with the other property mentioned above.
==See also==