cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using a While tag on the mega descriptors

smitakasinath
Super Contributor

Hi,

 

We have a requirement to display all children of a process on the website. I read about the While Tag in the mega exchange document but have never used it on the website. Is there a way to use the while tag to accomplish this?

 

Something like

 

While(process has children)

      display process name

End While

 

Thanks in advance for your help

 

5 Replies

smitakasinath
Super Contributor

Hello ,

 

the approaches above to use queries and [Component="Component"] worked.. Thanks a lot!

 

However, I still face a problem on the descriptor for org units

 

I am trying to query the structure of the org units in order to display the parents of an orgunit while on its descriptor.

 

Used the code below, and found that the meta model for org units had a "component" collection  associated to an org unit

 

[Component="Aggregation Of"]
     [Component="Component"]
          [ComponentProperty="Short Name" Link=Out/]
     [/Component]
[/Component]

 

I also tried creating a query using deeply given  below to get the structure:

 

select Org-Unit where Component deeply = &Org-Unit

 

this yeilds correct results, but am a little lost as to what sorter can be used in order to sort the results in order of hierarchy 

 

 

 

 

smitakasinath
Super Contributor

Hello ,

 

the approaches above to use queries and [Component="Component"] worked.. Thanks a lot!

 

However, I still face a problem on the descriptor for org units

 

I am trying to query the structure of the org units in order to display the parents of an orgunit while on its descriptor.

 

Used the code below, and found that the meta model for org units had a "component" collection  associated to an org unit

 

[Component="Aggregation Of"]
     [Component="Component"]
[ComponentProperty="Short Name" Link=Out/]
[/Component]
[/Component]

 

 

 

jhorber
MEGA
MEGA

Hello smitakasinath

 

Tags in HTML descriptor do not enable to the 'While' or 'For' instructions

As ki6i, explained, it is recommended to use the component tag to process items of a collection

Note that you can name a MetaAssociationEnd or a query

 

Ex:

[Component="Select [Organizational Process] Where[Organizational Process Type]='B'"]
  [ComponentProperty=Name/]
[/Component]

 

For complex code, you can eventually call a VB script macro in a HTML descriptor

See http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mr25AAA

Jerome

And, in addition, you can also create a Query using the Deeply operator in order to search deep intot the structure of a process.

ki6i
Trusted Contributor

If you need to do that in the descriptior there is the Component tag that you should use. Example:

 

[Component="Select [Application]"]
  [Component="Component"]
    [ComponentProperty="Short Name" Link=Out/]
  [/Component]
[/Component]

 

Advice you to look into the Publisher documentation