Eduardo Orozco Sanchez
Posts: 0
Joined: Tue Jun 24, 2014 5:03 pm

How to show a grid item mapped in a list, based on the value returned from the list query

I have a list that is mapped to a query service.
The list item contains a grid ( tag1p) with 1 label field and an image.
Image

The grid is set to not visible, and I want to change it to visible (show) if the label in the grid is !== to undefined with a JS in the mapping

The Appery('tag1p').show(); only works for the first element on the list, how can I make the JS work for each item in the list?
I have tried $(this).parents().find("[dsid=tag1p]").show(); but it does't work

Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to show a grid item mapped in a list, based on the value returned from the list query

Hi Eduardo,

Please follow these steps:

1 Open your mapping.

2 Make link from response field in DB(where you have need information) to grid component-visible property. http://prntscr.com/4iicq3/direct

3 Click "Add JS" on the grid component - visible property. http://prntscr.com/4iicxg/direct

4 JS Editor will appear, populate it with following code:

pre

//Condition to hide grid. You need to set in following line correct for your case condition.
var isHidden = value == "helloWorld";
return isHidden;

/pre

Regards.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to show a grid item mapped in a list, based on the value returned from the list query

Hi Eduardo,

Please follow these steps:

1 Open your mapping.

2 Make link from response field in DB(where you have need information) to grid component-visible property. http://prntscr.com/4iicq3/direct

3 Click "Add JS" on the grid component - visible property. http://prntscr.com/4iicxg/direct

4 JS Editor will appear, populate it with following code:

pre

//Condition to hide grid. You need to set in following line correct for your case condition.
var isHidden = value == "helloWorld";
return isHidden;

/pre

Regards.

Return to “Issues”