Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

jsonata : complexe expression not working?

New Here ,
May 24, 2023 May 24, 2023

Hi,

 

I tried theses expressions, but nothing display

  1. {{$join(specificRequest.certificationCategory)}}
  2. {% conditional-section expr(specificRequest.certificationCategory != null) %}Non{% end-section %}
  3. {% conditional-section expr(“FORMATION_ACTIONS” in specificRequest.certificationCategory) %}has FA{% end-section %}
  4. {% conditional-section expr($contains($join(specificRequest.certificationCategory), “COMPETENCE_ASSESSMENT”)) %}tototoot {% end-section %}
  5. {{expr($count(specificRequest.certificationCategory))}}

 

The first displays:

FORMATION_ACTIONSCOMPETENCE_ASSESSMENTEXPERIENCE_ACQUISITION_ACTIONSLEARNING_ACTIONS

The second displays the text correctly

The third and fourth display nothing

The last displays 4

 

The json looks like that, and everythongs works on jsonata.

{
"specificRequest": {
    "certificationCategory": ["FORMATION_ACTIONS", "COMPETENCE_ASSESSMENT"]
}
}
312
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 25, 2023 May 25, 2023

Hi @Stephane29154717bl5j,

I've tried out the template with the json data you've provided. 

  • For 1,5 I think you might've used a different json which contains four entries while generating the output.
  • For 2,3 please use normal double quotes(") instead of specials double quotes().

Please let us know if you have any more doubts.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2023 May 25, 2023
LATEST

Thanks, I'l succeed getting all working using computing moore stuff in my backend.
I provide more boolean to my template. It works.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources