Prompt
5 min
displays a text box for the user to enter text and returns the text that the user entered syntax prompt(message, picklist, fieldareawidth, fieldareaheight, password, required, defaultvalue) enabled for for a description of the business object categories, see notes on "enabled for" docid\ u26v9fecfs6ilwa0 pvjd business object category yes/no business rules before save rules yes1 business rules calculation rules (after save, with or without also recalculate on load) yes business rules calculation rules (before save or always, without also recalculate on load) yes1 business rules calculation rules (before save or always, with recalculate on load) yes business rules editing rules yes2 business rules initialization rules yes1 business rules read only rules no business rules required rules yes2 business rules validation rules yes1 client expressions no object permissions no services yes ldap yes mobile yes quick actions (except ui quick actions) yes1 ui quick actions no reports yes1 search/dashboard without field references yes1 search/dashboard with field references no 1 except in services 2 except in services and when this field appears on a form or is triggered by such a field parameters this function takes at least one parameter and can take up to seven parameters to enter a parameter without entering a value for a parameter before it, enter "" for the parameter for which you do not have a value for example, to enter the message , picklist , and fieldareaheight parameters, but no fieldareawidth parameter, enter $(prompt(message, picklist, "", 25)) in this example, the application uses 25 as the value of the fieldareaheight parameter and not the value of the fieldareawidth parameter parameter description message the message that shows as a prompt picklist (optional) the name of a pick list that provides values for the user to select from if this parameter is null or empty, the function does not specify a list but displays a text box instead fieldareawidth (optional) the width of the text area in pixels fieldareaheight (optional) the height of the text area in pixels password (optional) can be either true or false if true, the application treats the entered text as a password and displays it as asterisks when entered required (optional) can be either true or false if true, the user must enter or pick a value defaultvalue (optional) the text value to return if the user does not enter anything or select a value return value text value examples the following is an example of using this function in a quick action $(prompt("select cause code", "incident cause code", 400, 200, false, true)) in this example, the required parameter is set to true, because the application prompts the user for a value that is required this is to ensure that the user specifically chooses a proper value before the quick action is executed in this example, there is no default value provided so there is no defaultvalue parameter and therefore the function only has six parameters add the following expression to the resolution field of the update object quick action for an incident $(prompt("please enter resolution", "", 400, 200)) this returns a prompt for a resolution note with an empty text area that is 400 pixels in width and 200 pixels in height another example is in the social board where a quick action creates a business object $(prompt("summary", "", 350, 25, "", "", " conversationtitle ")) $(prompt("description", "", 400, 200, "", "", " conversationcontent ")) in the first instance, the original post is included in the summary field in the second instance, the original post and the comments are included in the description field you also can use this function in a saved search, to prompt an employee team when the search is being run you can use the prompt() function in the context of the update object quick action to ask the user to fill out a value for a field in the business object this is typically used when the underlying field is also validated $(prompt(titleinprompt, "")) $(prompt(titleinprompt, namedvalidationlist)) there are two variations of the prompt() function if the second parameter is an empty string, you can enter any value for the field if the second parameter is a text value, the application assumes that this value is a named validation list and uses it to constrain the allowable values that you can enter for the field the following prompt() function updates the owner team for an incident $(prompt("incident owner team", "team of standarduserteam used in incident")) the following example shows the syntax in the existing reassign owner team quick action in for an incident prompting for a value in a quick action example
