Ryein Goddard
Posts: 0
Joined: Fri Jul 19, 2013 3:09 am

mapping and returning something that sets item as visible

I want to set something as visible. What do I return so it is set as visible.

For example when mapping I can add JS inside my js I would do.

if(value == "blah")
{
return true;
}

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

mapping and returning something that sets item as visible

That's the concept for sure ... Depending on the default value of the control ... Be sure to return false if your blah condition evaluates to the negative ...

Ryein Goddard
Posts: 0
Joined: Fri Jul 19, 2013 3:09 am

mapping and returning something that sets item as visible

I am using console.log and no matter what I do the values are always undefined for

value and element

The thing is I know it is working because it works fine.

I should add I am trying to set the visibility on a json REST return array.

value[n].value == "blah" is what I am trying to use.

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

mapping and returning something that sets item as visible

Hi Ryein,

So you want to set visibility of single component in accordance to the some element in the response?

If so it's better to use new event handler for "success" event with action "Run javascript".

And inside this JS you can use "data" variable as response array.

For example:

pre

if(data[n] && data[n] == "blah")
Apperyio("componentToManageName").hide()
else
Apperyio("componentToManageName").show();

/pre

Regards.

Return to “Issues”