Outils pour utilisateurs

Outils du site


enovia:mql

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
enovia:mql [2022/10/27 07:33] – nicoantoenovia:mql [2022/10/27 07:35] (Version actuelle) – nicoanto
Ligne 7: Ligne 7:
  
 We want to retrieve the Person object linked with the Project Space object through Member relationship for which the Project Role is set to Contributor (Member relationship attribute). We want to retrieve the Person object linked with the Project Space object through Member relationship for which the Project Role is set to Contributor (Member relationship attribute).
-If we apply the "//print bus//" MQL command on the Project Space object and we select the Member relationship (//print bus 'Project Space' myProject - select from[Member].to.name//), MQL engine gives us 4 objects (muUser1, myUser2, myUser3 and myUser4).+ 
 +If we apply the "//**print bus**//" MQL command on the Project Space object and we select the Member relationship (//**print bus 'Project Space' myProject - select from[Member].to.name**//), MQL engine gives us 4 objects (muUser1, myUser2, myUser3 and myUser4).
    
 Now, consider the following MQL command :  Now, consider the following MQL command : 
Ligne 13: Ligne 14:
  
 The MQL engine gives us only myUser3. The MQL engine gives us only myUser3.
 +
 +**Rule**:
 +
 +To perform conditional select when expanding an object, you can include a Where clause criteria in the squarebrackets of select from[ ].to[ ] or to[ ].from[ ] clauses. The relationship or type namepattern is specified first, and then may be followed by the Where clause, the fields delimited by the“|” character.
 + 
 +In the previous example, the starting point of the where clause criteria is the expanded relationship. If you want to perform a where clause on the related object (in the example, the Person objects), you can use the following synthax :
 +<code>print bus 'Project Space' myProject - select from[Member|to.name == Contributor].to.attribute[First Name].value</code>
  
  
enovia/mql.1666856031.txt.gz · Dernière modification : (modification externe)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki