cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to set Dynamic Query Parameters in MDO query

Former Member
0 Kudos
1,228

Dear Experts,

I'm using MII 15.0.

I've created a MDO object.

And I've created a MDO query which mode is : insert.

It works well when I put fix value in Insert Query tab Attribute Value.

My question is :

  1. How to set a dynamic parameter in Insert Query tab, and then insert the data dynamically?
  2. How to test the MDO query with a dynamic parameter?
  3. How to test the Transaction with a dynamic parameter MDO query?
  4. Is there any document of how to use the MDO in MII?
  5. Is there a management tool to manage the MDO tables? to CRUD the records in MDO table more easily.

Thank you!

Best Regards!

Feng Sihao

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Feng,

In any MDO Query Template where you want to 'dynamic' values, map a Param.x template property to each MDO Attribute that you need to insert/update. You can also user Param.x template properties in the Filter and Sort expressions. When you assign or use a Param.x property, enclose it in [] like this:

example attribute mapping:

example Where clause:

where Attribute1 =='[Param6]'  //note that you have to quote strings like this.

You can assign a data type to the Params, and assign a default value to a Param. I recommend that you assign a data type to each used Param tha exactly matches the data type of the MDO attribute that you want to map to, or when used in a Sort of Filter expression.

There are no MDO Management tools that I know of, you have to build MDO Queries for all Insert/Update/Delete queries, and manage the MDO object from MII Workbench.

Regards, Steve

Former Member
0 Kudos

Dear Stubbs,

Thank you very much!

I understand how to set parameter in MDO query.

The key word is : [param.number]

Now I can set the default value and parameter type of the parameter, and test to see the result.

about:

     3. How to test the Transaction with a dynamic parameter MDO query?


How to pass the value of the dynamic parameter in the MII Transaction?


I'm testing the PCo connection. I can call the MII Transaction from PCo when the tag value changed.

The MII Transaction has a inputXML property.

How can I get the tag value from PCo (inputXML)?  and then pass it to the dynamic parameter of the MDO query?

Thank you!!!!

Former Member
0 Kudos

I found the way:

config the link of the MDO query in the transaction.

and link the parameter with the INPUTXML value.

That's easy!

Thank you~!


feng.sihao 撰写:

Dear Stubbs,

Thank you very much!

I understand how to set parameter in MDO query.

The key word is : [param.number]

Now I can set the default value and parameter type of the parameter, and test to see the result.

about:

     3. How to test the Transaction with a dynamic parameter MDO query?


How to pass the value of the dynamic parameter in the MII Transaction?


I'm testing the PCo connection. I can call the MII Transaction from PCo when the tag value changed.

The MII Transaction has a inputXML property.

How can I get the tag value from PCo (inputXML)?  and then pass it to the dynamic parameter of the MDO query?

Thank you!!!!

Answers (0)