Method "getValueOrKey" not found in expression

Hi, I'm getting this alert in console.log when trying to check the value of an element in a JSON object.

image

How to resolve this bug?

Is dmxFormatter.js included on the page?

No.

How to check this? I have a field where to format a date. Does this call dmxFormatter?

The formatter js file will be included when you add some formatting using the UI. If you just entered the expression by hand in the code, the include won’t be added.

Yes, the dmxFormatter is on the page.

Is it included on the layout page? That is where it will actually reside. Be sure to save the layout page.

No, it's on the content page. There is nothing on the layout page.

Where is this located? This is what you are looking for.

<script src="/dmxAppConnect/dmxFormatter/dmxFormatter.js" defer=""></script>

Most probably you didn't save the layout page after the include has been added on your content page. You should always make sure your layout page is saved before previewing the results in the browser.

Yes, the tag is in the layout.

Hmmm, and the formatter folder is located on the target?

Yes.

image

Sorry, I am out of ideas. :frowning:

The getValueOrKey formatter is only available for objects. Where is the expression used and what is key?