Getting Launcher LiveReport

Which IIQ version are you inquiring about?

Version 8.X

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

Hello Community,

I need to get the launcher of a LiveReport however when i use context.getUserName() it works just when i click on the save and preview mode button but when i click on save and execute i get a null value does anyone know how to solve this?

Thank you in advance

Hi @torry_salamat,

I had the same error after an upgrade from 7.3 to 8.2. Have you upgrade the system?

And can you share the error? If is possible, the lgos trace too.

Hi @torry_salamat,

In general, you will have your launcher’s username in the result. You can fetch this and then fetch the other details using context object.

Let me know how you are trying to fetch and what error is coming. If possible, please share snippet.

Thanks

Hello @Emanuele,
Thanks for your reply, i didn’t do any upgrade i’m using the 8.1 version
when i log the context.getUserName() variable i get Scheduler instead of the name of the identity that is logged in when i click on the save and execute button

Hello thank you for your reply,

I just need the launcher in the queryparameters to filter the data:

<TaskDefinition name="Report Launcher" type="LiveReport">
        <Attributes>
                <Map>
          <entry key="report">
            <value>
              <LiveReport title="Report Launcher">
         <DataSoure objectType="Identity" type="Filter">
           <QueryParameters>
                <Parameter argument="someArgument">
                  <QueryScript>
                   <Script>
                    <Source>
                         import sailpoint.object.*;
                         QueryOptions options = new QueryOptions();
                         String launcherName= context.getCurrentUser();
                         Identity id = context.getObjectByName(Identity.class,launcherName);
                          Filter filter = Filter.eq("someAttribute",id.getAttribute("someValue"));
                         options.addFilter(filter);
                         return options;
                    </Source>
                 </Script>
                 </QueryScript>
                </Parameter>
           </QueryParameters>
        </DataSource>
        <Columns>
        <ReportColumnConfig field="name" header="name" property="name"/>
        <ReportColumnConfig field="lastName" header="lastName" property="name"/>
        </LiveReport>
        </value>
        </entry>
        </Map>
        </Attributes>
</TaskDefinition>

this works fine when we click on the save and preview button on the report
but when it’s the generate button it doesn’t work

I have the same problem. Does anybody have a solution to this?

you have same error into the logs?

Hi @khda1,

Can you print the variables what are available
Based on the output the correct variable can be used to get the username.

Refer this article - https://community.sailpoint.com/t5/IdentityIQ-Forum/Getting-Current-Logged-in-UserID-in-Report-Data-Source/m-p/25391

Hello @vinnysail,
I need the launcher inside of my QueryScript in the taskdefinition but the args.get(“launcher”) is not working for me.
I get this error Attempt to resolve method: get() on undefined variable or class name: args

I saved the value of the launcher using context like in the second page of this articlewith context.setProperty(“launcher”,value); and it worked thanks a lot!

1 Like

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