Dmx-show question

i have a website with a Request.Querystring labeled ‘injury’

I am trying to show a div when only a condition is met. Here is what i have as my dmx-show on the div

dmx-show="(query.injury != ('Skin Disorder'||'Emergency Care'))"

so if the query is Skin or Emergency, i don’t want that div to show, but any other injuries i do.
Its working correctly for the Skin Disorder, but not for Emergency Care. Is this not written correctly?

Spaces…

The code that you need is:

query.injury !='Skin Disorder' || query.injury !='Emergency Care'

And it’s correctly generated when using the expression builder:

1 Like

Can we use spaces in the queries parameter values?

Well the spaces in the URLs are replaced by %20 -> Skin%20Disorder so there are no issues with that.

1 Like

so that is what i originally thought and had my coding. However, it doesn’t work as intended.
<div class="card pt-2 pl-2 pr-2" dmx-show="query.injury!='Skin Disorder'||query.injury!='Emergency Care'">

It shouldn’t be showing the Guided SOAP card

When i use my link
ATGenius - Athletic Trainer Injury Record Management it shows the Guided Soap card

I don’t have access to this page, as it requires login.

i disabled the security so you can check.

If i properly understand the logic, i think you need AND instead of OR here.

query.injury !='Skin Disorder' && query.injury !='Emergency Care'
1 Like

ahhh…yup that did it. I guess i was just thinking about it wrong. Thank you so much!!

1 Like

On the spaces topic, I hand code all of my dmx-shows and it works with spaces, new lines and many levels of brackets!

1 Like