fetching data from the linked table using query def in web application | Community
Skip to main content
Level 2
July 14, 2025
Solved

fetching data from the linked table using query def in web application

  • July 14, 2025
  • 1 reply
  • 474 views

Hi Team,

I'm trying to fetch the super team field data in relationship manager table and which is linked from recipient to relation ship manager as 1 to 1 cardinality.

I'm using below code to fetch them 
----------------------------------------------------------

var recipientquery = xtk.queryDef.create(<queryDef schema="nms:recipient" operation="select" >
<select>
<node expr="@id"/>
<node expr="[relationshipManager/@superTeam]" alias="@superTeamDec"/>
<node expr="Smart(Lower(@firstName)) + ' ' + Smart(Lower(@lastName))" alias="@fullName"/>
</select>


</queryDef> );
var recipientData = recipientquery.ExecuteQuery();

------------------------------------------------------------

But I'm getting below errors [Highlighted in red]

 
Element 'relationshipManager' unknown (see definition of schema 'Recipients (nms:recipient)'). XTK-170036 Unable to parse expression '[relationshipManager/@superTeam]'. SOP-330011 Error while executing the method 'ExecuteQuery' of service 'xtk:queryDef'.

Note: Here the table name and field name configured correctly as per the instance but still facing issue.

Could you please help to fetch the data.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ccg1706

Hi @vanivi1,

 

Great, by the image you are sharing the element name is lnkRelationshipManager, not relationshipManager. You should use the same name in your code. 

 

Let me know if it solves the error. 

 

Best, 

Celia

1 reply

ccg1706
Community Advisor
Community Advisor
July 15, 2025

Hi @vanivi1,

 

Based on your error you will need to define relationshipManager on your recipient schema, it seems that the link is not defined, which is why it fails. 

 

Once you confirm that the link is defined on you JS you should add a join. 

 

Let me know if you need more help!

 

Best, 

Celia

VaniVi1Author
Level 2
July 15, 2025

Hi @ccg1706 

FYI:

The link is configured in the recipient schema.

But why its not bale to get the data

 

ccg1706
Community Advisor
ccg1706Community AdvisorAccepted solution
Community Advisor
July 15, 2025

Hi @vanivi1,

 

Great, by the image you are sharing the element name is lnkRelationshipManager, not relationshipManager. You should use the same name in your code. 

 

Let me know if it solves the error. 

 

Best, 

Celia