Write Instructions either without showing fields or increase the size of field

Hi,
I am writing some instructions seperately without using helpKey.


I want these instruction to be visible in a broder field which fits it or without field borders i.e. only written instructions.

 <Field displayOnly="true" name="Instructions" type="string" value="User Name must be formatted as SVC-[Application]-[Service] (e.g. SVC-ADSYF-Process) • User Name should be within 20 characters • User Name should not contains any extra space except &amp;quot;-&amp;quot; symbol • Highly Privileged Account (HPA) names must not contain the below keywords: “Root”, “Administrator”, “Admin”, “Adm”, “Privileged”, ”Priv”, “Super”, “Power”, “Pwr”, “PA”, “HPA”.">
      <Attributes>
        <Map>
          <entry key="hidden">
            <value>
              <Script>
                <Source>import sailpoint.object.Field;

                  Field f8 = form.getField("Field_8");
                  String f8value = f8.getValue();
                  boolean hideField = false;

                  if(!("Service Account".equalsIgnoreCase (f8value))) {

                  hideField= true; 
                  
                  }
                  else {

                  
                  }
                  return hideField;</Source>
              </Script>
            </value>
          </entry>
          <entry key="readOnly" value="true"/>
        </Map>
      </Attributes>
    </Field>

I am using this code for the above output. How do I correct this?

Set the displayType=“textarea” in the form field. It will display the entire text.

 <Field displayOnly="true" name="Instructions" displayType="textarea" value="User Name must be formatted as SVC-[Application]-[Service] (e.g. SVC-ADSYF-Process) • User Name should be within 20 characters • User Name should not contains any extra space except &amp;quot;-&amp;quot; symbol • Highly Privileged Account (HPA) names must not contain the below keywords: “Root”, “Administrator”, “Admin”, “Adm”, “Privileged”, ”Priv”, “Super”, “Power”, “Pwr”, “PA”, “HPA”.">
      <Attributes>
        <Map>
          <entry key="hidden">
            <value>
              <Script>
                <Source>import sailpoint.object.Field;

                  Field f8 = form.getField("Field_8");
                  String f8value = f8.getValue();
                  boolean hideField = false;

                  if(!("Service Account".equalsIgnoreCase (f8value))) {

                  hideField= true; 
                  
                  }
                  else {

                  
                  }
                  return hideField;</Source>
              </Script>
            </value>
          </entry>
          <entry key="readOnly" value="true"/>
        </Map>
      </Attributes>
    </Field>

Thank you @Arun-Kumar :blush:

1 Like

Hi @Arun-Kumar
Can I display them as a list?
Like in different lines so that after sentence ends I switch to different line and start typing. I tried this but it gotten into single line instead,

<Field displayOnly="true" name="Instructions">
      <Attributes>
        <Map>
          <entry key="hidden">
            <value>
              <Script>
                <Source>import sailpoint.object.Field;

                  Field f8 = form.getField("Field_8");
                  String f8value = f8.getValue();
                  boolean hideField = false;

                  if(!("Service Account".equalsIgnoreCase (f8value))) {

                  hideField= true; 

                  }
                  else {


                  }
                  return hideField;</Source>
              </Script>
            </value>
          </entry>
          <entry key="readOnly" value="true"/>
        </Map>
      </Attributes>
      <Value>
        <List>
          <String>User Name must be formatted as SVC-[Application]-[Service] (e.g. SVC-ADSYF-Process)</String>
          <String>• User Name should be within 20 characters</String>
          <String>• User Name should not contains any extra space except &amp;quot;-&amp;quot; symbol</String>
          <String>• Highly Privileged Account (HPA) names must not contain the below keywords: “Root”, “Administrator”, “Admin”, “Adm”, “Privileged”, ”Priv”, “Super”, “Power”, “Pwr”, “PA”, “HPA”.</String>
        </List>
      </Value>
    </Field>

You can try like this

 <Script>
        <Source>

          String message="";
          message="User Name must be formatted as SVC-[Application]-[Service] (e.g. SVC-ADSYF-Process).";
          message=message+"\n"+"User Name should be within 20 characters.";
          message=message+"\n"+"User Name should not contains any extra space except &amp;quot;-&amp;quot; symbol";
         message=message+"\n"+"Highly Privileged Account (HPA) names must not contain the below keywords: “Root”, “Administrator”, “Admin”, “Adm”, “Privileged”, ”Priv”, “Super”, “Power”, “Pwr”, “PA”, “HPA”";
         
          return message;

        </Source>
      </Script>
1 Like

Hi @Arun-Kumar
Thanks, this solution is working but one thing.
I am getting the output as below

I can expand this field by stretching it from bottom right corner of the frame. But is it possible that the frame automatically expands till the instruction ends and I don’t have to expand or resize it manually.

Or if I can remove the borders around and show it just as a simple text.

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