I need to pass array of values as a parameter to fetch data. Values are based on column from referenced entity. To make this clearer, API data page has data structure built upon single entity Project. But it should be filtered by array of values (specifically column SortOrder) from ProjectStage entity. It does contain foreign key, so I am able to create lookup field to get this value. But question is how to pass it as a array of values and filter it by it?
- Create a lookup field based on refProjectStageId column and use lookup returning the priority of the project stage
- right click the newly created lookup field and click on ‘Create (List) filter with parameter’.
- In API xslt data page’s data structure add the filter into the filterset used in API page
- Rightclick on API page and it should offer you the name of the list paramete as a parameter mapping candidate. Choose it and so that create it.
- At just created parameter fill the ‘MappedParameterName’ (name of the url parameter to pass the value with, e.g. ‘stageSortOrder’), set ‘IsList’ to true and fill ‘ListSeparator’ as e.g. ‘_comma’ data constant.
Then you can start using it e.g. http://my-server/api/listProjects?stageSortOrder=10,20,30