Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Always expanding on Order Guide "Options"

Andrew112
Mega Guru

Is there a way to always expand the order guide "options" on the service portal ? 

aria-expanded="true" didn't seem to work.

Any help appreciated.

1 ACCEPTED SOLUTION

Allen Andreas
Tera Patron

Hi,

I believe the logic is setup to always expand if the amount of "variables" is greater than 0, so always expanded if there's something there.

<div ng-if="data.variables.length > 0" ng-init="c.variable_toggle = true">

Are you saying you want it to always be expanded, even when empty? And to basically remove the toggle?

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

5 REPLIES 5

Allen Andreas
Tera Patron

Hi,

I believe the logic is setup to always expand if the amount of "variables" is greater than 0, so always expanded if there's something there.

<div ng-if="data.variables.length > 0" ng-init="c.variable_toggle = true">

Are you saying you want it to always be expanded, even when empty? And to basically remove the toggle?

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Andrew112
Mega Guru

Hello Allen, thanks for the reply, where exactly would I put that line? 

 

Actually having the first one expand would be enough when the page loads, the others can be collapsed.

Andrew112
Mega Guru

I noticed that if I put "panel-collapse in collapse" that works in the inspector, but if I put that in the widget it doesnt work 😞

 

 

Hi,

That line is already in the script. What I was asking was: do you want it always expanded even when there's nothing to show? Or to always expand when there's at least 1 variable/item to show? Because based off the logic from the HTML I pasted above, it will always show if greater than 0...

So when are you not seeing it expanded when it should be?


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!