Complexe transform for dates and mutivalued attributes

Hello,

I have a specific requirement I’ve started to work on but I wonder if this is possible with transforms or if I just should use a rule.

It about startDate and endDate on the identityProfile attibutes. Those are coming from an API. A technical API moreover so I have the tricky part that the attribut can be mutivalued if the identity has had multiple contracts in the society. I would then have several attributes named like " contract_endate" having a value. So right now, i’m stocking them in a multivalued account attribute.
Bear in mind i’m using the webservice SaaS and it’d be bad having to switch to webservice to use afterRule to get only the latest date, which was my first idea.

So, using a transform I’d need to to this :

get the latest contract date in the account attribute (may contains more than one)
if the attribute is empty, get the latest date in an another attribute (same)
else get the lastest date in a third attribute.

Is this possible somehow using transforms, or should I directly go to cloud rule ?

regards,

Hi Loic,
I can think of putting the below logic on how you can achieve it without cloud rule.

  1. Use split transform to split the multivalued account attribute data if you have a constant delimiter
  2. Use Date compare to get the latest contract date by comparing the value among the multiple contract date values and assign it to an identity atrribute
  3. Or replace both Step 1 and 2 by using Web Services After Operation Rule and extract the latest contract date from the multivalued account attribute
  4. Use firstValid transform to get the first non-empty date from any one the 3 attributes.

not sure how well it would work with a single multi-valued attribute, but if you’re dealing with separate attributes, see the logic i used here as a starting point: Transform - Find Users' Last Activity Date (find latest date in array)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.