Static HTML Content Block Condition

mikealderson
Tera Contributor

I have a Homepage that is displayed to both roled and non-roled users.   I want to display suggested links, but hide the links that the non-roled users can't access.   Right now the page is a series of a few content blocks and shows all the links to both sets of users.   My problem is when I make one of the content blocks conditional, it not only hides that content block, but all the other content blocks listed on the page.

1 ACCEPTED SOLUTION

I just received a message back from Now Support, and they said it was a known issue with a Problem ticket of PRB648998.


View solution in original post

4 REPLIES 4

Brian S5
Kilo Sage

I have a similar issue. I have a few content blocks on our ess home page, and when i put a condition on one block, it applies to everything underneath that block. Our condition is based around location. here is my conditional script.



if(gs.getUser().getLocation() == 'location1_sysID' || gs.getUser().getLocation() == 'location2_sysID' || gs.getUser().getLocation() == 'location3_sysID' || gs.getUser().getLocation() == 'location4_sysID') {


      answer=true;


      } else {


  answer = false;


  }


I just received a message back from Now Support, and they said it was a known issue with a Problem ticket of PRB648998.


Thanks Mike.



I will let them know that its also being seen in Helsinki Patch 7 as that is what we are using currently.



find_real_file.png


I am also facing a similar issue. Below script runs fine under background script, but does not work for Content Block Condition. Moreover, none of the log statements get executed. Currently using: glide-fuji-12-23-2014__patch13-hotfix1-05-26-2016



gs.log("Test");


var gr = new GlideRecord('u_rb_con');


gr.addQuery('u_type','RB_Common');


gr.query();


if(gr.next()) {


        answer = ((gr.u_rb_en == 1) && (gr.u_show_rb_wi == 1));


        gs.log(answer);


}



Any idea if this is fixed in any version yet?