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

Referencing a query with two parameters from HTML descriptor

rhollas
Super Contributor

Hello.

 

I am trying to create a list of Applications integrated with a given Application per content in our web-site. Covering both old-style messages and message flows.

First I am calling a query listing outgoing contents from the given application from a [Component]-tag. Looping over each content and placing them as the first column in a html-table.

In the second column, I create a new [Component] inside the "content-component". From this inner-component I try to call a query taking two input parameters, Application and Content.

 

When i try to execute the Descriptor, I get the error message: "Object <query-name>, Property Application: Error, argument type incompatible"

 

Is there a limitation on only one argument when calling queries from a descriptor?
Is there a way around my issue?

 

/Rune

3 Replies

In the code of the macro

You can use HTML tags such as <table></table>

You can browse repository using API script functions (ex: user GetCollection to browse between application and sub application) and insert the data (ex: application short name) in this code.

 

You are not allowed to use tags of HTML descriptors such as 

[Component]. They will not be solved in this context.

The macro should generate plain HTML code. This code will be inserted in the HTML report where the tag ExternalCall is coded.

Jerome

rhollas
Super Contributor

Hei Jerome,

thanks for the reply.
I've never used VB-Macros before, and I am not sure how to use in this case.
To elaborate the issue, I paste the code in question below.

If it was possible to call/execute query having two parameters some way, that would be nice.
Is it possible to "build" the query-string dynamically in the descriptor in some way?

This code executes in a descriptor for an application

\c calling query listing all contents sent from an application as message or message-flow

[Component="HMN - Contents sent from an Application" Sorter="ShortName:A"]

 [If=First]
  <table class="visibleTable">\n
   <tr>\n
    <th>[Variable=CodeTemplate Id=5D52695358A06AFE/]</th>
    <th>[Variable=CodeTemplate Id=AF83D9EC5486D87D/]</th>  
   </tr>\n
 [/If]
 <tr>\n
 \c column #1 listing out all contents 
<td><img src="[ObjectPicture/]">  &nbsp; [ComponentProperty=ShortName Target="_self" Link=Out/]</td>

\c column #2 listing out all receiever-applicatons for content where application in question is sender  

<td>
   [Component="HMN - Application Target for given outgoing Content from given Application" Sorter="ShortName:A"]
    <img src="[ObjectPicture/]">  &nbsp; [ComponentProperty=ShortName Target="_self" Link=Out/]<br/>
   [/Component]
  </td>  
 </tr>\n

 [If=Last]
  </table>\n
 [/If]
[/Component]

jhorber
MEGA
MEGA

rhollas

 

I am not aware that you can use a query with several types of parameters (Application and Content) is such a situation. 

I suggest you call a macro from the HTML descriptor using the tag ExternalCall. In this macro you can used API script to access repository data and HTML code to format the HTML table.

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

Jerome