Use select query in sailpoint forms

Which IIQ version are you inquiring about?

*Unsure

Hello All, I want to execute select query in sailpoint forms and populate the data in dropdown dynamically. Is it possible to do in sailpoint forms code. If yes, can you please share sample code.

Hi @akallur03,

It is possible to execute the select query in sailpoint forms. Please see the code below for reference.

         <Field displayName="Test query" helpKey="test the sql query" name="Test query">
            <Script>
              <Source>
                import sailpoint.object.*;
                String row;
                Iterator iterate=context.search("sql:  SELECT firstname FROM  spt_identity where id='id'",null,null);   
                while(iterate.hasNext()){
                 row=iterate.next();
                }
                 return row;
               </Source>
            </Script>
          </Field>
1 Like

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