Search based on creation Identity date in Advanced Analytics

Which IIQ version are you inquiring about?

Version 8.1

Share all details related to your problem, including any error messages you may have received.

Hello team,

Is possible to create a population in IIQ based on the creation Identity date? Like the last creations of identities in 24 hours,

created >= {date.YESTERDAY}

I was trying to get some example but I couldn’t, for now I’m trying to get this type of value basing on actual day.

Thank you,
Regards.

You can try below format in filter

< Filter operation=“GT” property=“created”>
< Value>

epoch value of date

< /Value>
< /Filter>

1 Like

Is possible to run a script inside? Like:
In this case is a String, but can must work with long type

<GroupFilter>
    <CompositeFilter operation="OR">
      <Filter ignoreCase="true" operation="EQ" property="name">
        <Value>
          <Script>
            <Source>
              import java.lang.*;
              return "username";
            </Source>
          </Script>
        </Value>
      </Filter>
    </CompositeFilter>
  </GroupFilter>

Trying to return a type I can’t, returns a error casting from Script to String

You can leverage the sailpoint utils class for any conversions and yes you can run these filters in via run rule and get the values in list format and or if required in a map and implement jasper class to have a report generated.

1 Like

Why the filter doesn’t work? The returned value works with DATE$LONG_NUMBER

I am using this GroupDefinition

  <GroupFilter>
    <CompositeFilter operation="OR">
      <Filter operation="GT" property="created">
        <Value>
          <Script>
            <Source>
              import java.time.LocalDate;
              import java.time.ZoneId;
              import java.util.Date;
              import java.time.Instant;

              LocalDate today = LocalDate.now();

              LocalDate previousDate = today.minusDays(1);

              Instant previousDateInstant = previousDate.atStartOfDay(ZoneId.systemDefault()).toInstant();
              long timestampMillis = previousDateInstant.toEpochMilli();

              return timestampMillis;
            </Source>
          </Script>
        </Value>
      </Filter>
    </CompositeFilter>
  </GroupFilter>

Thanks

try adding < Date> < /Date> after < value> and before < /value>

Show the following error:
Caused by: org.xml.sax.SAXParseException; lineNumber: 27; columnNumber: 18; The content of element type "Date" must match "null".

Is the date tag properly closed with < /date>

Yes

Okay i guess date tag is not supported , i would expect it to work with simple string return in milliseconds, but not sure why it didn’t work

1 Like

this way it works for me

< GroupFilter>
< CompositeFilter operation=“OR”>
< Filter operation=“GT” property=“created”>
< Value>
< Date>1712755981437< /Date>
< /Value>
< /Filter>
< /CompositeFilter>
< /GroupFilter>

1 Like

Great. But do you know a way to create this long value using a Java script? I’m trying to do that based on the current system day.

Probably have to write a rule to generate the population object. so whenver you need to generate the population execute the rule and create the group definition object of the population.

2 Likes

Well, I think that’s the best way now for that.

Many thanks!!

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