cancel
Showing results for 
Search instead for 
Did you mean: 

SSCE - Set text field values to a Query template

former_member202208
Active Participant
0 Kudos

Hi all,

In SSCE, can we set input text field values to a Query template and update igrid.

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

swaroop_anasane
Active Contributor
0 Kudos

Hi Sridhar,

You can use "OnEnter" event but again you will have to write a custom function to be called on this event. In that function, you should pass parameters to update the grid.

Regards,

Swaroop

former_member202208
Active Participant
0 Kudos

Hi Swarop,

I could pass the values with Event configuration, no custom functions used.


Thanks,

Shridhar..

Former Member
0 Kudos

Hi Shridhar,

Yes you can do it.

1. Get the Textfield values using getTextValue method()

2. For passing values to the query template you can use AJAX call if your MII version is 15.0

    because in 15.1 we have an i5Command which can do this.

For Query:

$.ajax({

            type: 'POST',

            url: '/XMII/Illuminator?QueryTemplate=<Query Path>&content-type=text/json',

            success: function(data) {

               alert("Query executed successfully");

          } // Success Function

            });   // Ajax Call

3. After the AJAX call you can just update the grid using Grid.update(true) method.

And you will see the updated data in the Grid.

If you wanted to pass the values to a Query Template which is associated with the Grid you can do it.

Grid.getQueryObject().setParam(1,"<Value>");

Or

Grid.getQueryObject().setParameter(1,"<Value>");

Regards,

Sriram

former_member202208
Active Participant
0 Kudos

Hello Shriram,

Thanks for your reply.

I wondering if we can we do it by configuring Parameters & Events in Design Dashboard & not with custom code.

Thanks,

Shridhar..

Former Member
0 Kudos

Yes you can do it via events.

Regards,

Sriram

former_member202208
Active Participant
0 Kudos

Thank you. I got it.

Thanks,

Shridhar..