dennislee
dennislee

Reputation: 65

how to getBy multi fields using LCDS

I am new to Flex. In my project, I use LCDS to define a holiday table which contain holidayId, countryCode and companyCode. LCDS generated all the getBy which are very handy. However, I need to get the records which are having countryCode = US AND companyCode = ABC. Surely I cannot use any of those generated getBy (each of them deals with a single field only). Can you suggest me how to modify the code in generated services (in my case, it is _Super_HolidayService.as) to handle multi-key data retrieval or point me to the right direction. Thanks.

Upvotes: 0

Views: 49

Answers (1)

ffxtian
ffxtian

Reputation: 559

Assuming that you're using LiveCycle's Model Driven Development, the solution is to add a filter to your Holiday entity. For example, you could add the following to the source of your Data Model (inside of your Holiday entity):

<filter name="getByCountryAndCompany" criteria="countryCode eq, companyCode eq"/>

This will create a getByCountryAndCompany method in your HolidayService that will query based on a match of both countryCode and companyCode.

Please see Adobe's Application Modeling Reference here http://tinyurl.com/7ras5yk for more information on the "filter" tag and its syntax.

Upvotes: 0

Related Questions