How to hide unchecked checkbox variable on Self Portal.

Erica2
Tera Contributor

Hello,

I have 3 checkboxes A, B, C  in the Catalog item.  User only checked A checkbox, but in the portal it is showing up true and false values.  It is possible only shows the checkbox with true value?  Thank you

User selected "A"

find_real_file.png

In the Portal is showing all values.

find_real_file.png

 

1 ACCEPTED SOLUTION

Hi,

 

Please remove the extra <div> from line no 13.

Thanks,

AMAN

View solution in original post

20 REPLIES 20

Glad to hear that!!

Will replicate the same in PDI and will post the remediation. Can you share the screenshot for the same that will be helpful.

 

Thanks,

Aman

Aman,

I screwed up the date field. I got it works now.  Many thanks for your time and effort.

Aman,

Currently, on the Self-Portal is showing True and False value for all the checkboxes.

Is it possible to change them to Yes and No value?

find_real_file.png

Hi @Aman Singh_ - We are currently trying to do something similar on mail script, we are showing a variable summary on a case opened notification once the request is submitted, however the variable summary on the notification, it still shows the checkboxes values which are false. Do you know what change we could make to the below to remove the false checkboxes here:

We have tried adding a number of other if conditions but still no luck

//template.print("Summary of Case :<br />");
//template.print(current.number);
template.print(current.number + ":  " + current.category.getDisplayValue() + "<br />");
template.print("    <br />");
var keys = [];
var set = new GlideappSequencedQuestionSet();
set.setTableName(current.sys_class_name);
set.setTableSysID(current.sys_id);
set.load();
var vs = set.getFlatQuestions();
if (vs.size() > 0)
     printVariables(vs);

    function printVariables(vs) {
    template.space(4);
    template.print("Summary of request:<br />");
		template.print("    <br />");

    for (var i=0; i < vs.size(); i++) {
         if(vs.get(i).getLabel() != '' && JSUtil.notNil(vs.get(i).getDisplayValue()) ){
            template.space(4);
            template.print('     ' +  vs.get(i).getLabel() + " : " + vs.get(i).getDisplayValue() + "<br />");  
    }
  }

	}

 

Erica2
Tera Contributor

Aman,

Currently, on the Self-Portal is showing True and False value for all the checkboxes.

Is it possible to change them to Yes and No value?

 

find_real_file.png