This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Optional Textfield Entries

Something I've been wanting to do is create a "middle initial" field within my user creation template. I tried to create a checkbox that would target the "initials" variable and put a period before the single character, and a trailing whitespace afterward.

However, I don't think checkboxes can be used within user provisioning templates, but I'm wondering if someone was able to figure out how to put in optional text-fields

{
"Name": "middleInitial",
"Definition": {
"Type": "Checkbox",
"DefaultValue": false,
"Label": "Add Middle Initial?",
"Constraints": {
"ForbiddenChars": [],
"ValidationRule": "",
"ValidationInformation": "",
"UniquenessConstraint": "",
"CreationRule": ".{initials} "
}
}
},


{
"Name": "initials",
"Definition": {
"Type": "TextField",
"Label": "Middle Initial",
"Description": "",
"DefaultValue": null,
"IsRequired": false,
"IsEnabled": true,
"isHidden": false,
"isHiddenFromRequester": false,
"Constraints": {
"MaxLength": 1,
"ForbiddenChars": [],
"ValidationRule": null,
"ValidationInformation": null,
"UniquenessConstraint": "",
"CreationRule": ""
}
}
},

Parents
  • Hey bp00, here is your checkbox.

    "Key": "distributiongroupe",
    "Value": {
    "Type": "Checkbox",
    "DefaultValue": true,
    "Label": "Create distribution group ",
    }
    If you want a textarea or field just change the type.

  • Unfortunately, when checking the checkbox on the webform, the Boolean "true" is populated into the middle name textbox and not the character I place into the "Middle Initial" textbox entry.

    I try to utilize the middle initial by only when the checkbox is checked and it would automatically populate the given fields like the DisplayName or the CN:

    {
    "Name": "cn",
    "Definition": {
    "Type": "TextField",
    "Label": "['en-us:Full Name', 'de-de:Common-Name', 'fr-fr:Nom commun']",
    "Description": "",
    "DefaultValue": null,
    "IsRequired": true,
    "IsEnabled": true,
    "isHidden": false,
    "isHiddenFromRequester": false,
    "Constraints": {
    "MaxLength": -1,
    "ForbiddenChars": null,
    "ValidationRule": "",
    "ValidationInformation": "",
    "UniquenessConstraint": "",
    "CreationRule": "{givenname} {middleInitial} {sn}"
    }
    }
    },
    {
    "Name": "displayName",
    "Definition": {
    "Type": "TextField",
    "Label": "['en-us:DisplayName']",
    "Description": "",
    "DefaultValue": null,
    "IsRequired": false,
    "IsEnabled": false,
    "isHidden": false,
    "isHiddenFromRequester": false,
    "Constraints": {
    "MaxLength": -1,
    "ForbiddenChars": null,
    "ValidationRule": "",
    "ValidationInformation": "",
    "UniquenessConstraint": "",
    "CreationRule": "{sn}, {givenname} {middleInitial}"
    }
    }
    },

    But it looks like the checkbox Boolean string value only comes up

  • Yeah you will only get the boolean as value. If you want a string you need to use a textfield. Unfortunately, the templates are quite limited. You cannot use the boolean for an if query.

Reply Children
No Data