Refresh on change in form

Which IIQ version are you inquiring about?

8.4p2

Please share any images or screenshots, if relevant.

[Please insert images here, otherwise delete this section]

Please share any other relevant files that may be required (for example, logs).

[Please insert files here, otherwise delete this section]

Share all details about your problem, including any error messages

I have two tables like this, which are stored in two different tables within the same database. I pulled these tables into Sailpoint using the JDBC connector, added them as object types, and added the relevant columns to the table’s schema. I listed this data on a form by kind and type. So far, everything is fine. The refresh-on-change feature is enabled in the forms, but when I select a kind in the kind section, the types associated with it don’t appear; they all appear. Do I need to add anything to the schema here? The common data between the two tables is type_code and cv_type.

THIS CODE FOR SECOND OPTION, objectype=type

import org.apache.commons.lang3.StringUtils;
  import org.apache.log4j.*;
  import sailpoint.api.*;
  import sailpoint.object.*;
  import sailpoint.tools.*;
  import sailpoint.object.Filter;
  import sailpoint.object.QueryOptions;
  import java.util.Date;
  import org.apache.commons.collections.CollectionUtils;

  import sailpoint.object.QueryOptions;
  import sailpoint.object.Filter;
  import java.util.*;


  private String ruleName = "pulltype";
  private String loggerString = "com.ihsteknoloji.beanshell." + ruleName.replace(" ", "");
  private boolean debug = true;

  private Logger logger = Logger.getLogger(loggerString);


  if (debug) {
    logger.setLevel(Level.DEBUG);
  }

  logger.debug("");
  logger.debug("****************************************************");
  logger.debug("Entering '" + ruleName + "' Rule");
  logger.debug("Current Time: " + new Date());
  logger.debug("****************************************************");
  logger.debug("");

  //  ...WRITE CODES HERE...
  List selectList = new ArrayList();
  Set seen = new HashSet();
  String nativeType = "type";                 
  String appName    = "KFK";                  


  QueryOptions qo = new QueryOptions();
  qo.add(Filter.eq("type",     nativeType));
  qo.add(Filter.eq("application.name", appName));

  List attrs = context.getObjects(ManagedAttribute.class, qo);

  if (CollectionUtils.isNotEmpty(attrs)) {
    for (ManagedAttribute ma : attrs) {
      // CV_TYPE ve UNVAN attribute’larını al
      String cvType = ma.getAttribute("CV_TYPE") != null
        ? ma.getAttribute("CV_TYPE").toString()
        : null;
      String unvan  = ma.getAttribute("UNVAN")  != null
        ? ma.getAttribute("UNVAN").toString()
        : null;

      if (StringUtils.isNotEmpty(cvType) && StringUtils.isNotEmpty(unvan)) {
        String entry = cvType + " - " + unvan;
        if (seen.add(entry)) {
          selectList.add(entry);
        }
      }
    }
  }

  //  ...CODES FINISH HERE...

  logger.debug("");
  logger.debug("Finish | " + ruleName + " Rule | Current Time: " + new Date());
  logger.debug("");

  return selectList;

Hello @meltemcan

Welcome to the SailPoint developer community. Can you please share form where value is getting updated on change. Also share referenced code as well

Hello @asharma65

import org.apache.commons.lang3.StringUtils;
  import org.apache.log4j.*;
  import sailpoint.api.*;
  import sailpoint.object.*;
  import sailpoint.tools.*;
  import sailpoint.object.Filter;
  import sailpoint.object.QueryOptions;
  import java.util.Date;
  import org.apache.commons.collections.CollectionUtils;

  import sailpoint.object.QueryOptions;
  import sailpoint.object.Filter;
  import java.util.*;


  private String ruleName = "pulltype";
  private String loggerString = "com.ihsteknoloji.beanshell." + ruleName.replace(" ", "");
  private boolean debug = true;

  private Logger logger = Logger.getLogger(loggerString);


  if (debug) {
    logger.setLevel(Level.DEBUG);
  }

  logger.debug("");
  logger.debug("****************************************************");
  logger.debug("Entering '" + ruleName + "' Rule");
  logger.debug("Current Time: " + new Date());
  logger.debug("****************************************************");
  logger.debug("");

  //  ...WRITE CODES HERE...
  List selectList = new ArrayList();
  Set seen = new HashSet();
  String nativeType = "type";                 
  String appName    = "KFK";                  


  QueryOptions qo = new QueryOptions();
  qo.add(Filter.eq("type",     nativeType));
  qo.add(Filter.eq("application.name", appName));

  List attrs = context.getObjects(ManagedAttribute.class, qo);

  if (CollectionUtils.isNotEmpty(attrs)) {
    for (ManagedAttribute ma : attrs) {
      // CV_TYPE ve UNVAN attribute’larını al
      String cvType = ma.getAttribute("CV_TYPE") != null
        ? ma.getAttribute("CV_TYPE").toString()
        : null;
      String unvan  = ma.getAttribute("UNVAN")  != null
        ? ma.getAttribute("UNVAN").toString()
        : null;

      if (StringUtils.isNotEmpty(cvType) && StringUtils.isNotEmpty(unvan)) {
        String entry = cvType + " - " + unvan;
        if (seen.add(entry)) {
          selectList.add(entry);
        }
      }
    }
  }

  //  ...CODES FINISH HERE...

  logger.debug("");
  logger.debug("Finish | " + ruleName + " Rule | Current Time: " + new Date());
  logger.debug("");

  return selectList;
import org.apache.commons.lang3.StringUtils;
  import org.apache.log4j.*;
  import sailpoint.api.*;
  import sailpoint.object.*;
  import sailpoint.tools.*;
  import sailpoint.object.Filter;
  import sailpoint.object.QueryOptions;
  import java.util.Date;
  import org.apache.commons.collections.CollectionUtils;

  import sailpoint.object.QueryOptions;
  import sailpoint.object.Filter;
  import java.util.*;


  private String ruleName = "pullKind";
  private String loggerString = "com.ihsteknoloji.beanshell." + ruleName.replace(" ", "");
  private boolean debug = true;

  private Logger logger = Logger.getLogger(loggerString);


  if (debug) {
    logger.setLevel(Level.DEBUG);
  }

  logger.debug("");
  logger.debug("****************************************************");
  logger.debug("Entering '" + ruleName + "' Rule");
  logger.debug("Current Time: " + new Date());
  logger.debug("****************************************************");
  logger.debug("");

  //  ...WRITE CODES HERE...
  List selectList = new ArrayList();
  Set seen = new HashSet();
  String nativeType = "tip";                 
  String appName    = "KFK";                  

  QueryOptions qo = new QueryOptions();
  qo.add(Filter.eq("type",     nativeType));
  qo.add(Filter.eq("application.name", appName));

  List attrs = context.getObjects(ManagedAttribute.class, qo);

  if (CollectionUtils.isNotEmpty(attrs)) {
    for (ManagedAttribute ma : attrs) {
      // Sadece TYPE_NAME alınıyor
      Object tn = ma.getAttribute("TYPE_NAME");
      if (tn != null && StringUtils.isNotEmpty(tn.toString())) {
        String entry = tn.toString();
        // Set ile tekrarları engelle
        if (seen.add(entry)) {
          selectList.add(entry);
        }
      }
    }
  }

  //  ...CODES FINISH HERE...

  logger.debug("");
  logger.debug("Finish | " + ruleName + " Rule | Current Time: " + new Date());
  logger.debug("");

  return selectList; // Return Value

Can you share form used here

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Workflow PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Workflow created="1752069340143" explicitTransitions="true" id="0a5a120f97ee1f5b8197ef787bef038f" modified="1753421724453" monitored="true" name="LCM - Create KFK" significantModified="1753421724453">
  <Variable initializer="string:true" name="transient"/>
  <Variable initializer="string:false" name="trace"/>
  <Variable input="true" name="identityName"/>
  <Variable name="plan"/>
  <Variable name="success"/>
  <Variable name="message"/>
  <Variable initializer="string:true" name="optimisticProvisioning"/>
  <Step icon="Start" name="Start" posX="28" posY="10">
    <Transition to="Form"/>
  </Step>
  <Step icon="Analysis" name="Form" posX="116" posY="1">
    <Approval name="KFK Dış Kullanıcı Talebi" owner="ref:identityName" return="firstName,lastName,tc,kfkType,dealerType,email,phone,title" send="firstName,lastName,tc,kfkType,dealerType,email,phone,title">
      <Form name="KFK Dış Kullanıcı Talebi">
        <Attributes>
          <Map>
            <entry key="hideIncompleteFields">
              <value>
                <Boolean></Boolean>
              </value>
            </entry>
            <entry key="includeHiddenFields">
              <value>
                <Boolean></Boolean>
              </value>
            </entry>
            <entry key="pageTitle" value="KFK Dış Kullanıcı Talebi"/>
          </Map>
        </Attributes>
        <Section label="Kullanıcı Bilgileri" name="Kullanıcı Bilgileri">
          <Field displayName="Ad" name="firstName" postBack="true" required="true" type="string">
            <ValidationScript>
              <Source>public Boolean control(String name) {
    for (int i = 0; i &lt; name.length(); i++) {
        char c = name.charAt(i);
        if (!Character.isLetter(c) || Character.isWhitespace(c)) {
            return true;
        }
    }
    return false;
}

if (control(firstName) == true) {
    return "İsim bilgisi rakam, boşluk ve özel karakter içeremez.";
}
</Source>
            </ValidationScript>
          </Field>
          <Field displayName="Soyad" name="lastName" postBack="true" required="true" type="string">
            <ValidationScript>
              <Source>public Boolean control(String name) {
    for (int i = 0; i &lt; name.length(); i++) {
        char c = name.charAt(i);
        if (!Character.isLetter(c) || Character.isWhitespace(c)) {
            return true;
        }
    }
    return false;
}

if (control(lastName) == true) {
    return "Soyad bilgisi rakam, boşluk ve özel karakter içeremez.";
}
</Source>
            </ValidationScript>
          </Field>
          <Field displayName="TC Kimlik No" name="tc" required="true" type="string">
            <ValidationRule>
              <Reference class="sailpoint.object.Rule" id="0a5a120f97ee1f5b8197ef8c80720416" name="Create KFK - TC Validation"/>
            </ValidationRule>
          </Field>
          <Field displayName="Tür" dynamic="true" name="kfkType" postBack="true" required="true" type="string">
            <AllowedValuesDefinition>
              <RuleRef>
                <Reference class="sailpoint.object.Rule" id="0a5a120e9837197b819837a08c111352" name="KFK - Pull Tip"/>
              </RuleRef>
            </AllowedValuesDefinition>
          </Field>
          <Field displayName="Bayi Tipi" dynamic="true" name="dealerType" postBack="true" required="true" type="string">
            <AllowedValuesDefinition>
              <RuleRef>
                <Reference class="sailpoint.object.Rule" id="0a5a120e983618118198372b5a5e0159" name="KFK - Pull Type"/>
              </RuleRef>
            </AllowedValuesDefinition>
          </Field>
          <Field displayName="Cep Telefonu" dynamic="true" name="phone" required="true" type="string">
            <ValidationRule>
              <Reference class="sailpoint.object.Rule" id="0a5a120f97ee1f5b8197ef97bdda0491" name="Create KFK - Phone Validation"/>
            </ValidationRule>
          </Field>
          <Field displayName="Email" name="email" required="true" type="string">
            <ValidationScript>
              <Source> if (!email.contains("@")) {
        return "Geçersiz e-posta formatı: '@' karakteri eksik.";
    }</Source>
            </ValidationScript>
          </Field>
          <Field displayName="Ünvan/Görev" name="title" postBack="true" required="true" type="string"/>
        </Section>
        <Button action="next" label="Onayla"/>
        <Button action="cancel" label="İptal" skipValidation="true"/>
      </Form>
    </Approval>
    <Transition to="Build Plan"/>
  </Step>
  <Step action="rule:Create KFK Build Plan" icon="Default" name="Build Plan" posX="262" resultVariable="plan">
    <Transition to="Stop"/>
  </Step>
  <Step icon="Stop" name="Stop" posX="438" posY="18"/>
</Workflow>

Can you put some log statements in your rule to see if you are getting the value of kind selected on the form in the rule for type AllowedValuesDefinition.