Avatar

Correct answer by
Level 4

Hello,

 

Please check following points.

 

  1. Can you first check what is the value of language enumeration? In my case, it is like below.

             Go to Platform -> Enumeration.

 

               Parvesh_Parmar_0-1651656918719.png

 

 

2. If you want to check only for one recipient then you need to give some condition in the queryDef. In the below example I added Id.

 

                var query = xtk.queryDef.create(

                                            <queryDef schema="nms:recipient" operation="getIfExists">

                                                  <select>

                                                             <node expr="@language"/>

                                                   </select>

                                                           <where>

                                                                 <condition expr="@id = 1" />

                                                             </where>

                                                           </queryDef>

 

  // Run the query.

   var res = query.ExecuteQuery();

                                 

     if ( res.@language =='E' )

     {

    

                 // Add code to show english div

    

     }

       else {

      

       // Add the code to show French div

      

       }

 

 

Thanks.

Parvesh.

 

View solution in original post