Jump to content
Changes to the Jaspersoft community edition download ×


  • Posts

  • Joined

  • Last visited

bmorata's Achievements


Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges



  1. Hi, first of all, I am not an expert using Jasper and JSONQL. I am trying to use it and I get some problems when I write an expression that I need. The input JSON i have is this: { "customer": { "id" : "Customer_20200305-1623-53ln-RQZX-95hasMTLJWa4", "href": "http://customer-customer-service-care-cd-drop31.ilocpde22.corp.amdocs.com/customerManagement/v1/customer/Customer_20200305-1623-53ln-RQZX-95hasMTLJWa4", "name" : "Amit4598", "status" : "Active", "statusReason": "Reason4", "engagedParty": { "type" : "PartyRef", "refType": "Individual", "id" : "Individual_01101404-0555-442e-8882-aaa2a02205f6", "href" : null, "name" : "givenName645130 familyName610747" } }, "individuals": [ { "id" : "Individual_01101404-0555-442e-8882-aaa2a02205f6", "href": "http://party-individual-service-care-cd-drop31.ilocpde22.corp.amdocs.com/partyManagement/v1/individual/Individual_01101404-0555-442e-8882-aaa2a02205f6", "givenName" : "Rayko", "middleName" : "Stoyanov", "familyName" : "Pepelanov", "formattedName" : "Sr. Rayko Stoyanov Pepelanov", "fullName" : "givenName674627 middleName6042 familyName654554", "preferredGivenName": "preferredGivenName", "birthDate" : "1980-08-18T12:16:47.447Z" }, { "id" : "Individual_01101404-0555-442e-8882-aaa2a0220525", "href": "http://party-individual-service-care-cd-drop31.ilocpde22.corp.amdocs.com/partyManagement/v1/individual/Individual_01101404-0555-442e-8882-aaa2a02205f6", "givenName" : "paco", "middleName" : "Stoyanov", "familyName" : "Pepelanov", "formattedName" : "Sr. Rayko Stoyanov Pepelanov", "fullName". : "givenName674627 middleName6042 familyName654554", "preferredGivenName": "preferredGivenName", "birthDate". : "1980-08-18T12:16:47.447Z" } ]}[/code]What I need is to get the givenName json field from the individuals list whose id field has the same value as the id json field in customer.engagedParty.id. So, I have this expression: individuals.id(@val=="Individual_01101404-0555-442e-8882-aaa2a02205f6")^.givenName[/code]It works, but it has the static value of the id, and I want to get it from customer.engagedParty.id dinamically. I have tried with some expressions but it doesn't work: individuals.id(@val==customer.engagedParty.id)^.givenNameindividuals.id(@val==^^.customer.engagedParty.id)^.givenNameindividuals.id(@val==^.^.customer.engagedParty.id)^.givenNameindividuals.id(@val==$F{id})^.givenName # being the id field the value of customer.engagedParty.idindividuals.id(@val==$P{id})^.givenName # being the id parameter the value of customer.engagedParty.idindividuals.id(@val==$V{id})^.givenName # being the id variable the value of customer.engagedParty.id[/code]I don't know what to do. Please, could you help me to get the correct expression in order to get the id? Thank you.
  • Create New...