I am trying to write a custom IML function that will parse a set of dates from fields. The difficulty comes from the fact that the fields are not known in advance, but rather, they come from an RPC and I’ll be getting a mixture of date and non-date fields.
A similar problem is already covered in the Custom Apps Development Training videos, with a significant difference - the fields there are known in advance. That does not apply for me and thus the solution is not directly applicable.
What I would like to do is to have my IML function access the result from the RPC call that gets the fields, so that I can then figure out which of the fields are dates and thus which should be parsed as such. So the function would look something like this:
function parseAllDates(parameters) {
// This next line is what I'm trying to figure out!
const dateParameters = rpc.getFields.map(field => field.name)
Object.entries(parameters).forEach(entry => {
// The actual parsing logic is identical to the one in the video
...
});
return parameters
}
So ultimately my question boils down to - is there any way in which I can access the result of RPC calls from an IML function that parses the parameters ahead of sending them to the server? If there is, I haven’t been able to find it in either the text documentation or the videos.