Pass list as argument to the rest URL from mendix application

0
I am new to mendix. I have a mendix application that syncronizes its few tables from another database. One of the tables has some employees information (say salary info). The employee table is not synced.  Now the requirement is not to list the inactive employees from a page showing the employee salary. I want to remove the salaries from this page where the employee is inactive. I am trying to add a workflow to pass the list of this salary details table to a java application where I will filter out the inactive employees and give back the list as response. But It seems while calling the rest url, I can not pass the list.  Please tell me what is the correct way to do this.  Thanks,
asked
2 answers
0

So your Employees have some sort of identifier, say EmployeeId (Autonumber) and you want to pass it to the REST service?

You can add a query parameter of type string.

Create a JSON snippet

[1,2,3,4]

Create an import mapping based on that snippet.

In the microflow, you use an import mapping to turn the string into a list of objects.

In the list that you want to return, you can filter out the employees with those EmployeeId's

answered
0

To create JSON from a list of objects:

1. Create a JSON structure that has a sample of the what you would like the JSON to look like. See https://docs.mendix.com/refguide/json-structures

2. Create an import mapping based on that JSON snippet. See https://docs.mendix.com/refguide/import-mappings

3. In the microflow, use an Import Mapping Action. See https://docs.mendix.com/refguide/import-mapping-action

answered