Quantcast
Channel: PTC Community : Popular Discussions - Integrity
Viewing all articles
Browse latest Browse all 3432

[IM] logical operations with relationships in queries

$
0
0

Hi @all,

 

we have in IM an Item (Module-Request (MR)), which has subitems (Tasks) linked via relationship. Both item-types have workflows. The tasks can have different task-types:

 

MR --+-- task (task-type A) (obligatory)

     +-- task (task-type B) (optional if task-type C exists)

     +-- task (task-type C) (optional if task-type B exists)

     +-- task (task-type D) (obligatory)

     +-- task (task-type E) (obligatory)


All tasks are linked with the same relationship-field in the MR.The MR has a workflow with many states, and in every state it will append one task.

 

Now we want to do a query about this: If a MR is in a special state ("InTest") and one or more of the tasks type B or C are linked, and all of the linked tasks (type B or C) are in the same special state ("Finished" or "Invalid"), the the query should find this MR. Oll other tasks (type A or D or E) doesnt matter. With the rule-wizard in the query-builder i didnt find a way to have the logical link between the linked tasks and their state. Here is the "nearest" rule i could find:

 

Query Definition: ((field["State"] = "InTest") and (relationship["Task_Type"] backwards forwards using ["ModulParent_to_TaskChild"] = "task-type A","task-type B") and (relationship["State"] backwards forwards using ["ModulParent_to_TaskChild"] = "Finished","Invalid") and (field["Type"] = "Module_Request"))

 

As you can see there are two separated definitions for the relationship "ModulParent_to_TaskChild" in this query, and i didnt find a way to link them together. The result is, that the first relationship-rule (red) gets me all MR with tasks with type B or C, but it doesnt matter in which state they are, and the second (green) gets me all tasks (from a to E) which are in state "Finished" or "Invalid". 

 

How can i bring them together? And i dont need a report, i need the result in a query. Thanks in advance for any hint, and i hope my writing isnt too much confusing

 

kind regards, Jens

 

 


Viewing all articles
Browse latest Browse all 3432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>