Page 1 of 1

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

Posted: Mon Sep 01, 2014 1:16 am
by Eduardo Orozco Sanchez

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


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

Posted: Mon Sep 01, 2014 2:13 am
by Yurii Orishchuk

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.


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

Posted: Mon Sep 01, 2014 2:15 am
by Yurii Orishchuk

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.


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

Posted: Mon Sep 01, 2014 2:51 am
by Eduardo Orozco Sanchez

Thanks!