PeopleCode Built-in Functions and Language Constructs: I

The PeopleCode built-In functions and language constructs beginning with the letter I are listed in alphabetical order within this topic.

Syntax

IBPurgeDomainStatus()

Description

Use the IBPurgeDomainStatus function to purge the domain status.

Parameters

None.

Returns

A boolean value: true if the functions completes successfully, false otherwise.

Syntax

IBPurgeNodesDown()

Description

Use the IBPurgeNodesDown function to purge the down nodes from the service operation monitor.

Parameters

None.

Returns

Boolean: true if the function completes successfully, false otherwise.

Syntax

Idiv(x, divisor)

Description

The Idiv function is an explicit integer division operation. It divides one number (x) by another (divisor).

Parameters

Parameter

Description

X

Specify an integer to be divided.

divisor

Specify the integer used to divide the first parameter.

Returns

An integer value.

Example

The following example sets &I1 to 1 and &I2 to -1:

&I1 = Idiv(3, 2);
&I2 = Idiv(17, 10);

Syntax

If condition Then
   statement_list
[Else
   statement_list]
End-If

Description

Use the If statement to execute statements conditionally, depending on the evaluation of a conditional expression. The Then and Else clauses of an If consist of arbitrary lists of statements. The Else clause may be omitted. If condition evaluates to True, all statements in the Then clause are executed; otherwise, all statements in the Else clause are executed.

Example

The following example’s first If statement checks for BEGIN_DT and RETURN_DT, and makes sure that RETURN_DT is greater (later) than BEGIN_DT. If this is True, the execution continues at the following line, otherwise execution continues at the line beginning with WinMessage:

If All(BEGIN_DT, RETURN_DT) AND
      BEGIN_DT = RETURN_DT Then
   &DURATION_DAYS = RETURN_DT - BEGIN_DT;
   If &DURATION_DAYS  999 Then
      DURATION_DAYS = 999;
   Else
      DURATION_DAYS = &DURATION_DAYS;
   End-if;
Else
   WinMessage("The beginning date is later then the return date!");
End-if;

Syntax

InboundPublishXmlDoc(&XmlDoc, Message.MessageName, Node.PubNodeName [, Enqueue])

Description

Use the InboundPublishXmlDoc function to send an asynchronous message that simulates an inbound request from an external node. The content data is based on an XmlDoc object.

Note: This function has been deprecated and remains for backward compatibility only. Use the IntBroker class InboundPublish method instead.

This function is used to test inbound message processing. Though you are sending a message to yourself, it goes through all the inbound message processing on PubNodeName.

The &XmlDoc object must already be instantiated and populated. The message included in the function call should be a nonrowset-based message, that is, one that isn't based on a hierarchical record structure.

Related Links

InBoundPublish

Parameters

Parameter

Description

&XmlDoc

Specify an already instantiated and populated XmlDoc object that you want to test.

MessageName

Specify an already existing nonrowset-based message, prefaced with the reserved word Message.

PubNodeName

Specify a node. This is for Sender Specified Routing (SSR), prefixed with the reserved word Node. The node defines the target for the published message.

Enqueue

Specify if the message is enqueued. This parameter takes a Boolean value.

Returns

A Boolean value: True if the message was successfully published, False otherwise.

Example

The following code example re-publishes the XmlDoc and simulates that it is coming from the node EXTERNAL.

Local XMLDOC &xmldoc = GetMessageXmlDoc();

InBoundPublishXmlDoc(&xmldoc, NODE.EXTERNAL);

Syntax

InitChat(logical queue ID, application data URL, customer username, [chat_subject][, chat_question][, wizard_URL][, priority][, skill_level][, cost])

Description

Use the InitChat function to engage a customer and an agent in a chat session. It places a chat request on a MultiChannel Framework queue and immediately launches a customer chat window. When an agent accepts this task from the queue, the system launches an agent chat window.

Note: Chats are implicitly queued with the current language setting of the initiator (%Language_user). Chats are only assigned to agents who have this language in their language list as specified on the Languages page of the Agents component.

Parameters

Parameter

Description

logical queue ID

Specifies the logical queue in which the task should be queued. It is a string value.

The logical queue ID is a case-sensitive value. The case used in the InitChat function must exactly match the case used when creating the logical queue ID on the Queues page.

application data relative URL

This is the relative URL of the application page you want the agent to see on the left side of the agent-to-customer chat window when the agent accepts the chat. This value needs to be provided by your program.

Note: This URL parameter must not point to content that includes JavaScript that breaks surrounding frames or that references the "top" window. In addition, the application page should not contain URL links to such content. This is because the Agent Chat Console is framed by the RenServer API which sends and receives the chat text.

customer username

This reflects the name of the customer or end user initiating the chat request. This value can be derived from the sign-in mechanism (%UserID) or by prompting the user.

This is the name used to identify the chat requestor in the MultiChannel Framework chat console. For example, in the chat history window, all text sent by the customer is prefixed with this name.

chat_subject

This is an optional string parameter. The application can indicate a subject of the chat request.

This could be prompted from the user or inferred from the page from which the chat is initiated. The system displays the subject on the agent's chat console when it assigns the chat to an agent.

chat_question

This is an optional string parameter. The application can indicate a specific question to be addressed in the chat. This could be prompted from the user or inferred from the page from which the chat is initiated.

The value appears in the agent's chat window history box immediately after accepting the chat. This enables the agent to know the customer's question without having to ask.

wizard_URL

This feature leads the agent to an application page from which the agent can select a URL to push to the customer. This is an optional string parameter. This is the relative URL of the application page you wish the agent to launch when the agent clicks the Grab button on the Agent Chat console.

If you do not provide this value, a default wizard is launched with no application-specific functionality.

If you do provide this value, the application page must provide a wizard for pushing a URL to the customer.

The wizard page provided by the application must be able to write the URL generated by the wizard to the URL field. The URL field is defined by PeopleSoft. In addition, you need to embed the HTML definition, MCF_GRABURL, which provides the Push and Push and Close buttons that push the URL in the URL field to the customer.

See the Example section for examples showing the PeopleCode that would be used to generate the relative URL that is passed in to InitChat and the PeopleCode that would be used to embed the provided MCF_GRABURL definition into your application page.

priority

This is an optional parameter. It is an integer value expressing the priority level of the request. The minimum value is 0 and there is no maximum value.

Specify the priority of this chat task. A higher value means a higher priority. MultiChannel Framework tasks are ordered on a physical queue based on their assigned priority, which means the system assigns a task of a higher priority before it assigns a task of a lower priority.

If no value is specified, the system uses the default value specified for that task type on the Task Configuration page.

When tasks have the same priority, the system orders the tasks according to time they were created. For example, suppose the following tasks exist: Priority 2 created at 11:15 AM and Priority 2 created at 11:16 AM. In this case, the system places the task created at 11:15 AM before the task created at 11:16 AM.

skill level

This is an optional parameter. It is an integer value expressing the minimum skill level required of the agent to whom the system routes the request. You set an agent's skill level in the Agent page. The minimum value is 0 and there is no maximum value.

The queue server assigns this task type to an available agent on that queue with the lowest skill level greater than or equal to the skill level required by the task.

If no value is specified, the system uses the default value specified for that task type in the Task Configuration page.

cost

This is an optional parameter. It is an integer value measuring the workload each task places on an agent. The cost of a task is an estimate of the tasks's expected complexity and of the time required to resolve the task. The minimum value is 0, and there is no maximum value.

The cost of a task is added to an agent's workload after accepting a task on the MultiChannel Framework console. A task can't be assigned to an agent if the difference between the current workload and the maximum workload defined for that agent on the Agent configuration page is less than the cost of this task.

If you do not specify a value, the system uses the default value specified for that task in the Task Configuration pages.

Note: If the required skill level or cost submitted exceeds the highest skill level or maximum workload of any of the agents on that queue, the task cannot be assigned.

Returns

Returns a unique Chat ID in the form of an integer. You can use this ID to reference the chat in the chat log.

If unsuccessful, it returns a message number. The message set ID for MultiChannel Framework is 162.

For example, 1302 is returned when an invalid task type or no value is provided.

Example

For example, the following PeopleCode could be used to generate the relative URL that is passed in to InitChat.

&WizURL = GenerateComponentContentRelURL(%Portal, %Node, MenuName.PT_MCF, "GBL", Component.MCF_DEMO_CMP, Page.MCF_URLWIZARD, "U");

The following is an example of embedding the provided MCF_GRABURL definition into your application page, using the GetHTMLText function.

Function IScript_GrabURL()
   &cssPTMCFDEF = %Response.GetStyleSheetURL(StyleSheet.PTMCFDEF);
   &cssPTSTYLEDEF = %Response.GetStyleSheetURL(StyleSheet.PTSTYLEDEF);
   &titleGrabURL = MsgGetText(162, 1170, "URL Wizard");
   &psDomain = SetDocDomainForPortal();
   If (&psDomain = "") Then
      &psDomain = SetDocDomainToAuthTokenDomain();
   End-If;
   &labelBtPush = MsgGetText(162, 1181, "Push");
   &labelBtPushClose = MsgGetText(162, 1186, "Push and Close");
   &HTML = GetHTMLText(HTML.MCF_GRABURL, &titleGrabURL, &cssPTSTYLEDEF, &cssPTMCFDEF, &psDomain, &labelBtPush, &labelBtPushClose);
   %Response.Write(&HTML);
End-Function;

The following is an example of the usage of InitChat.

&ret = InitChat("SALES", "http://www.support.example.com/products.html", 
"John Smith", "Widgets", "How to order widgets", "", 2, 2);

The following example illustrates how to pass a PeopleCode-generated URL using the GenerateComponentContentRelURL function for Application Data URL and wizards.

     &urlTestComponent = GenerateComponentContentRelURL(%Portal, %Node, MenuName.UTILITIES, "GBL", Component.MESSAGE_CATALOG1, Page.MESSAGE_CATALOG, "U");
   
   &WizURL = GenerateComponentContentRelURL(%Portal, %Node, MenuName.PT_MCF, "GBL", Component.MCF_DEMO_CMP, Page.MCF_URLWIZARD, "U");
   
   try
      
      &ret = InitChat(&QUEUEID, &urlTestComponent, &Username, &subject, &question, &wizurl, &priority, &minskill);
   catch Exception &E
      
      MessageBox(0, "", 0, 0, "Caught exception: " | &E.ToString());
   end-try;

Syntax

InsertImage([scrollpath, target_row,] [recordname.]fieldname [, max_size])

where scrollpath is:

[SCROLL.level1_recname, level1_row, [SCROLL.level2_recname, level2_row,]] SCROLL.target_recname

Description

Use the InsertImage function to associate an image file with a record field on a page. After the image file is associated with the record field, it can be saved to the database when the component is saved.

The following are the valid types of image files that can be associated with a record field:

  • BMP

  • DIB

  • JPEG

  • PNG

  • SVG

InsertImage uses a search page to enable the end user to select the image file to be used. This is the same search page used to add an attachment.

Note: To update an image field using this function, be sure that PSIMAGEVER field is also on the same record as the image field being updated.

Virus scanning can be performed on all files uploaded with the InsertImage function.

See Setting Up Virus Scanning.

Restrictions on Use in PeopleCode Events

InsertImage is a “think-time” function, which means it shouldn’t be used in any of the following PeopleCode events:

  • SavePreChange

  • SavePostChange

  • Workflow

  • RowSelect

  • Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls, or a Select (or one of its relatives) Rowset class method.

See Think-Time Functions.

Parameters

Parameter

Description

scrollpath

A construction that specifies a scroll area in the component buffer.

target_row

The row number of the target row.

[recordname .]fieldname

The name of the field to be associated with the image file. The field can be on scroll level one, two, or three of the active page. The recordname prefix is required if the function call is not on the record definition recordname

max_size

Specify the maximum size for this image file in kilobytes.

Note: The default value is 0, which indicates that there is no maximum size.

Returns

The InsertImage function returns either a constant or a number:

Numeric Value

Constant Value

Description

0

%InsertImage_Success

Image was successfully associated with the record field.

1

%InsertImage_Failed

Image was not successfully associated with the record field. When the component is saved the image file will not be saved to the database.

2

%InsertImage_Cancelled

User canceled the transaction so image file isn't associated with record field.

3

%InsertImage_ExceedsMaxSize

Image exceeds the maximum allowed size. 

13

%Attachment_ViolationFound

File violation detected by virus scan engine.

14

%Attachment_VirusScanError

Virus scan engine error.

15

%Attachment_VirusConfigError

Virus scan engine configuration error.

16

%Attachment_VirusConnectError

Virus scan engine connection error.

Example

&RC = InsertImage(EMPL_PHOTO.EMPLOYEE_PHOTO);

Syntax

InsertRow(scrollpath, target_row [, turbo])

where scrollpath is:

[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row, ] RECORD.target_recname

To prevent ambiguous references, you can also use SCROLL. scrollname, where scrollname is the same as the scroll level’s primary record name.

Description

Use the InsertRow function to programmatically perform the ALT+7 and ENTER (RowInsert) function.

Note: This function remains for backward compatibility only. Use the InsertRow method of the Rowset class instead.

InsertRow inserts a new row in the scroll buffer and causes a RowInsert PeopleCode event to fire, followed by the events that normally follow a RowInsert, as if the user had manually pressed ALT+7 and ENTER.

In scrolls that are not effective-dated, the new row is inserted after the target row specified in the function call. However, if the scroll is effective-dated, then the new row is inserted before the target row, and all the values from the previous current row are copied into the new row, except for EffDt, with is set to the current date.

Note: InsertRow cannot be executed from the same scroll level where the insertion will take place, or from a lower scroll level. Place the PeopleCode in a higher scroll level record.

Turbo Mode

The InsertRow built-in function can be executed in turbo mode or non-turbo mode. In turbo mode, default processing is performed on the row being inserted only, which provides a performance improvement over non-turbo mode. In non-turbo mode, default processing is performed on all rows.

Turbo mode is available as an option to the InsertRow, RowScrollSelect, RowScrollSelectNew, ScrollSelect, and ScrollSelectNew PeopleCode built-in functions. To execute any of these functions in turbo mode, pass a value of True in the optional turbo parameter. Non-turbo mode is the default for these functions.

Note: For the Flush, InsertRow, and Select methods of the Rowset class, turbo mode is the only available operating mode.

Related Links

InsertRow, Understanding Data Buffer Access, Specifying Data with References Using Scroll Path Syntax and Dot Notation

Parameters

Parameter

Description

scrollpath

A construction that specifies a scroll level in the component buffer.

target_row

The row number indicating the position where the new row will be inserted.

turbo

Specifies whether default processing is performed on the entire scroll buffer (non-turbo mode) or just the row being inserted (turbo mode). Pass a value of True to perform processing in turbo mode. Non-turbo mode is the default.

Returns

Optionally returns a Boolean value indicating whether the function executed successfully.

Example

The example inserts a row on the level-two page scroll. The PeopleCode has to be in the scroll-level-one record:

InsertRow(RECORD.BUS_EXPENSE_PER, &L1_ROW, RECORD.BUS_EXPENSE_DTL, &L2_ROW);

Syntax

Int(decimal)

Description

Use the Int function to truncate a decimal number x to an integer and returns the result as a Number value.

Note: PeopleSoft only supports 32 bit integers. The largest integer value we support is 4294967295.

Parameters

Parameter

Description

decimal

A decimal number to be truncated.

Returns

Returns a Number equal to decimal truncated to a whole integer.

Example

The following example sets &I1 to 1 and &I2 to -4:

&I1 = Int(1.975);
&I2 = Int(-4.0001);

Syntax

Integer(decimal)

Description

Use the Integer function to convert decimal to an integer (32 bit signed twos complement number) by truncating any fraction part towards zero and returns the result as an Integer value.

Differences between Int and Integer

There is one primary difference between the Int function and the Integer function.

  • The Int function rounds to a number in floating-decimal-point representation with a range of -9,999,999,999,999,999,999,999,999,999,999 to 9,999,999,999,999,999,999,999,999,999,999.

  • The Integer function truncates to a number in 32 bit binary twos-complement representation with a range of -2,147,483,648 to 2,147,483,647.

Parameters

Parameter

Description

decimal

A decimal number to be truncated to an integer.

Returns

Returns an Integer equal to decimal truncated to a whole integer. If decimal is outside the range that can be represented by an integer type, the result isn't defined.

Syntax

IsAddEnabled()

Description

Use the IsAddEnabled function to return a Boolean value indicating whether Add mode has been enabled on the component's Use tab.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

&bHasAddMode = IsAddEnabled();

Syntax

IsAddMode()

Description

Use the IsAddMode function to return a Boolean value indicating whether the component build process is in add mode.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Syntax

IsAGComponent()

Description

Use the IsAGComponent function to return a Boolean value indicating whether the component type is set to Activity Guide on the Fluid tab.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

Local boolean &bIsAG = IsAGComponent();
If (&bIsAG) Then
   /* Some processing */
End-If;

Syntax

IsAGRequest()

Description

Use the IsAGRequest function to return a Boolean value indicating whether the request was initiated by a component from within an activity guide wrapper.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If %Request.BrowserDeviceFormFactor = %FormFactor_Small Or
      IsAGRequest() = True Or
      IsMDRequest() = True Then
   /* Some processing */
End-If;

Syntax

IsAlpha(String)

Description

Use the IsAlpha function to determine if String contains only textual characters, including alphabetic characters from several scripts including Latin, Greek, Cyrillic and Thai, ideographic characters from Chinese, Japanese and Korean and Japanese kana. It excludes all punctuation, numerics, spaces and control codes

Parameters

Parameter

Description

String

Specify the string you want to search for alphabetic and other textual characters.

Returns

A Boolean value: true if the string contains only alphabetic and textual characters, false if it contains any numbers, punctuation or spaces.

Example

&Value = Get Field().Value; 
If IsAlpha(&Value) Then 
   /* do textual processing */ 
Else 
   /* do non-textual processing */ 
End-if;

Syntax

IsAlphaNumeric(String)

Description

Use the IsAlphaNumeric function to determine if String contains only textual and numeric characters.

Textual characters include all characters valid for the IsAlpha function. Alphanumeric characters do not include sign indicators and comma and period decimal points. If you want to check for numbers as well as sign indicators, use the IsNumber function.

Parameters

Parameter

Description

String

Specify the string you want to search for alphanumeric characters.

Returns

A Boolean value: True if the string contains only alphanumeric characters, False otherwise.

Example

&Value = Get Field().Value; 
If IsAlphaNumeric(&Value) Then 
   /* do alphanumeric processing */ 
Else 
   /* do non-alphanumeric processing */ 
End-if;

Syntax

IsBackEnabled()

Description

Use the IsBackEnabled function to return a Boolean value indicating whether the Back button is enabled on the component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If Not (IsBackEnabled()) Then
   PT_WORK.PT_BUTTON_BACK.Visible = False;
End-If;

Syntax

IsClassicPlusMode(COMPONENT_NAME, MARKET)

Description

Use the IsClassicPlusMode function to return a Boolean value indicating whether the classic plus theme is enabled or disabled at the system level and at the component level.

Parameters

Parameter

Description

COMPONENT_NAME

Specifies a string value representing the component.

MARKET

Specifies a string value representing the market associated with the component.

Returns

A Boolean value.

True if the classic plus theme is enabled at the system level and on the specified component.

False if the classic plus theme is disabled at the system level or on the component.

Example

If IsClassicPlusMode(%Component, %Market) Then
	MessageBox(%MsgStyle_OK, "", 0, 0, "This system is classic plus enabled.");
Else
	MessageBox(%MsgStyle_OK, "", 0, 0, "This system is not classic plus enabled.");
End-If;

Syntax

IsDate(Value)

Description

Use the IsDate function to determine if Value contains a valid date.

You can use this function when you want to determine if a value is compatible with the Date built-in function.

Uninitialized date variables, 0 numerics, or blank strings return true. If these values are possibilities for a variable passed to the IsDate function, you should add an additional check to ensure there is a value, such as using the All function.

Parameters

Parameter

Description

Value

Specify either a string or number you want to search for a valid date. Value is a number of the format YYYYMMDD or string of the format YYYY-MM-DD.

Returns

A Boolean value: True if the string contains a valid date, False otherwise.

Example

If IsDate(&Num) Then 
   &Datevalue = Date(&Num); 
End-if;

Syntax

IsDateTime(String)

Description

Use the IsDateTime function to determine if String contains a date/time string in the standard PeopleSoft format, that is, in the following format:

yyyy-mm-dd hh:mm:ss.mmmmmm

Parameters

Parameter

Description

String

Specify the string you want to search for a valid PeopleSoft date/time.

Returns

A Boolean value: True if the string contains a valid PeopleSoft date/time, False otherwise.

Example

The following example uses the short form of dot notation, by combining the getting the field value with getting the value of IsDateTime and making it a conditional statement:

If IsDateTime(GetField().Value) Then 
   /* do date processing */ 
Else 
   /* do non-date processing */ 
End-if;

Syntax

IsDaylightSavings(datetime, {timezone | "Local" | "Base"})

Description

Use the IsDaylightSavings function to determine if daylight saving time is active in the specified time zone at the specified date and time. For time zones that don’t observe daylight saving time, this function always returns False.

The system’s base time zone is specified on the PSOPTIONS table.

Parameters

Parameter

Description

datetime

The DateTime value you want to check.

timezone | Local | Base

Specify a value for converting datetime. The values are:

  • timezone - a time zone abbreviation or a field reference to be used for converting datetime.

  • Local - use the local time zone for converting datetime.

  • Base - use the base time zone for converting datetime.

Returns

A Boolean value: True if daylight saving time is active in the specified time zone at the specified date and time. Returns False otherwise.

Example

In the first example, TESTDTTM has value of 01/01/99 10:00:00AM. &OUTPUT is False.

&OUTPUT = IsDaylightSavings(TESTDTTM, "EST")

In this example, TESTDTTM has value of 04/05/99 12:00:00AM. &OUTPUT has a value of True: 12:00am PST = 3:00am EST, so daylight saving time has switched on.

&OUTPUT = IsDaylightSavings(TESTDTTM, "EST")

In this example, TESTDTTM has value of 04/05/99 12:00:00AM. &OUTPUT returns False: 12:00am PST = 1:00am MST, so daylight saving time hasn't started yet.

&OUTPUT = IsDaylightSavings(TESTDTTM, "MST")

In this example, TESTDTTM has value of 07/07/99 10:00:00. &OUTPUT returns False: ESTA is Indiana time, where they do not observe daylight saving time.

&OUTPUT = IsDaylightSavings(TESTDTTM, "ESTA")

Syntax

IsDigits(String)

Description

Use the IsDigits function to determine if String contains only digit (numeric) characters. Numeric characters do not include sign indicators and comma and period decimal points. If you want to check for numbers as well as sign indicators, use the IsNumber function.

Parameters

Parameter

Description

String

Specify the string you want to search.

Returns

A Boolean value: True if the string contains digits, False otherwise.

Example

If IsDigits(&MyValue) Then  
   /* do processing */ 
Else 
   /* do error processing */ 
End-if;

Syntax

IsFluidMode([Component.COMPONENT_NAME] [, Market.MARKET])

Description

Use the IsFluidMode function to return a Boolean value indicating whether fluid mode is enabled on the specified component. If neither optional parameter is specified, then the function operates on the current component.

Parameters

Parameter

Description

Component.COMPONENT_NAME

Specifies the component ID as a string value.

Market.MARKET

Specifies the market ID as a string value. Alternatively, you can specify the %Market system variable (without the Market. reserved word).

Returns

A Boolean value.

Example

Function SetGroupletCRefData(&Portal As ApiObject, &CRef As ApiObject)
...

   If PORTAL_CREF_ADM.PORTAL_URLTYPE = "UPGE" Then
      If IsFluidMode(PORTAL_CREF_ADM.PNLGRPNAME, PORTAL_CREF_ADM.MARKET) = True Then
         &CRef.IsFluid = 1;
      Else
         &CRef.IsFluid = 0;
      End-If;
...

Syntax

IsFluidSearchStart()

Description

Use the IsFluidSearchStart function to return a Boolean value indicating whether the user has already run a search on this component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If (IsFluidSearchStart()) Then
   Local ApiObject &Portal = %Session.GetPortalRegistry();
   &Portal.Open(%Portal);
   Local string &sComponentUrl = GenerateComponentContentURL(%Portal, %Node, @("Menuname." | %Menu), %Market, @("Component." | %Component), "", "");
   Local ApiObject &thisCref = &Portal.FindCRefByURL(&sComponentUrl);
   If &thisCref <> Null And
         All(&thisCref.Label) Then
      PTLAYOUT.PAGETITLE_GROUPBOX.Label = &thisCref.Label;
   Else
      PTLAYOUT.PAGETITLE_GROUPBOX.Label = MsgGetText(124, 522, "Message Not Found: Search"); /* TBD - need message set for label */
   End-If;
Else
   PTLAYOUT.PAGETITLE_GROUPBOX.Label = GetPageTitle();
   AddOnLoadScript("SearchPageClose();");
End-If;

Syntax

IsGroupletInteractive()

Description

Use the IsGroupletInteractive function to return a Boolean value indicating whether the fluid component running as a grouplet request is an interactive grouplet (or tile).

Important! Use this function within fluid applications only.

Parameters

None

Returns

A Boolean value.

Example

If IsGroupletRequest() And
      IsGroupletInteractive() Then
   /* Some processing */
End-If;

Syntax

IsGroupletRequest()

Description

Use the IsGroupletRequest function to return a Boolean value indicating whether the request was initiated by a grouplet, a tile, or a regular component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value: True when the request was initiated by a grouplet a tile, otherwise, False when the request was initiated by a regular component

Example

If Not IsGroupletRequest() Then
   If Not &bUsePhoneLayout Then
      &chart.HighlightSelectedDataPoint = True;
      &chart.IsChartDrillable = True;
      &chart.IsDrillable = True;
      REM &chart.AdditionalStyleSuffix = "CHARTDRILL";
   End-If;
End-If;
   
   
If &bUsePhoneLayout And
      Not IsGroupletRequest() Then
   PTPG_NUI_CHTOPT.PTPG_GROUP_BOX1.FreeFormStyleName = "ptpg_chart_phone";
   PTS_SRCH.PTS_CHART_GB.FreeFormStyleName = "ptpg_chartarea_phone";
End-If;

Syntax

IsHidden(scrollpath, target_row)

Where scrollpath is:

[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row, ] RECORD.target_recname

To prevent ambiguous references, you can also use SCROLL. scrollname, where scrollname is the same as the scroll level’s primary record name.

Description

Use the IsHidden function to verify whether a row is hidden or not.

Note: This function remains for backward compatibility only. Use the Visible row class property instead.

It returns True if the row is hidden, otherwise it returns False. IsHidden must be called in a PeopleCode program on a higher scroll level than one you are checking.

Related Links

Visible, Understanding Data Buffer Access

Parameters

Parameter

Description

scrollpath

A construction that specifies a scroll level in the component buffer.

target_row

The row number indicating the position of the row.

Example

The following example tests whether a specific row on scroll level one is hidden:

&ROW_CNT = ActiveRowCount(RECORD.LD_SHP_INV_VW);
&FOUND = True;
If &ROW_CNT = 1 Then
   &ORDER = FetchValue(LD_SHP_INV_VW.ORDER_NO, 1);
   If None(&ORDER) Then
      &FOUND = False;
   End-If;
End-If;
If &FOUND Then
   For &I = 1 To &ROW_CNT
      If Not IsHidden(RECORD.LD_SHP_INV_VW, &I) Then
         UpdateValue(ITEM_SELECTED, &I, "N");
      End-If;
   End-For;
End-If;

Syntax

IsHomeEnabled()

Description

Use the IsHomeEnabled function to return a Boolean value indicating whether the Home button is enabled on the component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If Not (IsHomeEnabled()) Then
   PT_WORK.PT_BUTTON_HOME.Visible = False;
End-If;

Syntax

IsIScriptAuthorized(RECORD_NAME, FIELD_NAME, Event_Name, Function_Name[, action]) 

Description

The IsIScriptAuthorized function returns a Boolean value indicating whether the current user is allowed to access the specified iScript.

Note: The PeopleSoft Administrator role implicitly has access to all iScripts; therefore, this function always returns True for users with this role.

Parameters

Parameter

Description

RECORD_NAME

Specify the WEBLIB derived/work record name that contains the target iScript as a String value.

FIELD_NAME

Specify the field name that contains the target iScript as a String value.

Event_Name

Specify the PeopleCode event name as a String value.

Function_Name

Specify the user-defined PeopleCode function to be executed as a String value.

action

Specify the empty string, "", for the action parameter. This parameter is not used and any other value is ignored.

Returns

A Boolean value: True if the user is authorized to execute the iScript, False otherwise.

Example

&bAddToAuth = IsIScriptAuthorized("WEBLIB_PTNUI", "PT_BUTTON_PIN", "FieldFormula", "IScript_SavePin", "");

Syntax

IsLogoutEnabled()

Description

Use the IsLogoutEnabled function to return a Boolean value indicating whether the Logout button is enabled on the component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If Not (IsLogoutEnabled()) Then
   PT_WORK.PT_BUTTON_LOGOUT.Visible = False;
End-If;

Syntax

IsMDAJAXTrf()

Description

For custom fluid wrapper components (fluid activity guides or master/detail components), use the IsMDAJAXTrf function to return a boolean value indicating whether fluid component transfers stay within the master/detail or activity guide wrapper. Since classic components are displayed within an iframe, this setting is ignored for classic component transfers. The default value is False; component transfers leave the wrapper.

Parameters

None.

Returns

A boolean value.

Syntax

IsMDComponent()

Description

Use the IsMDComponent function to return a Boolean value indicating whether the component type is set to Master/Detail on the Fluid tab.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If (IsMDRequest() Or
      IsMDComponent()) Then 
   /* Some processing */
End-If;

Syntax

IsMDGuided()

Description

For master/detail and activity guide components, use the IsMDGuided function to return a Boolean value indicating whether the master/detail or activity guide wrapper is in guided mode (that is, Previous and Next are displayed in the fluid banner). The default value is False; non-guided mode is in effect.

Note: If search results are to be displayed in the Master/Detail format (as set on the Fluid tab of the component definition), once a user drills into an individual search, the master/detail format is displayed, and this function returns true at that time.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

Local boolean &bIsGuided = IsMDGuided();
/* Some processing */
   If Not (&bIsGuided) Then
      PT_WORK.PT_BUTTON_NEXTLST.Visible = True;
      PT_WORK.PT_BUTTON_PREVLST.Visible = True;
   End-If;

Syntax

IsMDListPopup()

Description

For master/detail and activity guide components, use the IsMDListPopup function to return a Boolean value whether the master/detail or activity guide wrapper is in non-optimized mode (that is, navigation to pages is presented in a drop-down list in the fluid banner, not in the left panel). The default value is False; optimized mode is in effect (that is, items are presented in the left panel).

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If (IsMDListPopup()) Then
   /* Some processing */
Else

Syntax

IsMDListSlideout()

Description

For custom fluid wrapper components (fluid activity guides or master/detail components), use the IsMDListSlideout function to return a boolean value indicating whether a slide-out left panel has been enabled for the component.

Important! Use this function within fluid components (wrapper or inner) only.

Parameters

None.

Returns

A boolean value.

Syntax

IsMDNonOptimized()

Description

For master/detail and activity guide components, use the IsMDNonOptimized function to return a Boolean value whether the master/detail or activity guide wrapper is in non-optimized mode (that is, navigation to pages is presented in a drop-down list in the fluid banner, not in the left panel). The default value is False; optimized mode is in effect (that is, items are presented in the left panel).

Note: This function is equivalent to the IsMDListPopup function.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

Local boolean &bNonOptimized = IsMDNonOptimized();

If Not (&bNonOptimized) Then
   /* Some processing */
End-If;

Syntax

IsMDRequest()

Description

Use the IsMDRequest function to return a Boolean value indicating whether the request was initiated by a component from within the master/detail wrapper.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If (IsMDRequest() Or
      IsMDComponent()) Then 
   /* Some processing */
End-If;

Syntax

IsMDSearchEnabled()

Description

Use the IsMDSearchEnabled function to return a Boolean value indicating whether the search type is set to Master/Detail for the current component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If (IsMDSearchEnabled() Or
      IsStandardSearchEnabled()) Then
   PT_WORK.PT_BUTTON_SUBMIT.Visible = False;
   /* Some additional processing */
Else
   PT_WORK.PT_BUTTON_BACKS.Visible = False;
   If &tfld <> Null Then
      &tfld.Visible = False;
   End-If;
End-If;

Syntax

IsMenuItemAuthorized(MENUNAME.menuname,  BARNAME.barname, ITEMNAME.menuitem_name, PAGE.component_item_name[, action]) 

Description

The IsMenuItemAuthorized function returns True if the current user is allowed to access the specified menu item.

Note: You do not need to use this function to gray internal link pushbuttons/hyperlinks. This function is generally used for transfers that are part of some PeopleCode processing.

Parameters

Parameter

Description

menuname

The name of the menu where the page is located, prefixed with the reserved word MENUNAME.

barname

The name of the menu bar where the page is located, prefixed with the reserved word BARNAME.

menu_itemname

The name of the menu item where the page is located, prefixed with the reserved word ITEMNAME.

component_item_name

Specify the component item name of the page to be displayed on top of the component when it displays. The component item name is specified in the component definition. If you specify a page, it must be prefixed with the keyword PAGE. You can also specify a null ("") for this parameter.

action

Specify the action mode in which to start up the page. If action is omitted, the current action is used. Values are:

Constant

Description

%Action_Add

Add

%Action_UpdateDisplay

Update/Display

%Action_UpdateDisplayAll

Update/Display All

%Action_Correction

Correction

%Action_DataEntry

Data Entry

%Action_Prompt

Prompt

Returns

A Boolean value: True if the user is authorized to access the specified page, False otherwise.

Syntax

IsMessageActive(Message.Message_Name)

Description

Use the IsMessageActive built-in function to determine whether the specified message definition has been set to inactive in Application Designer.

Note: This function has been deprecated and remains for backward compatibility only. Use the IntBroker class IsOperationActive method instead.

Note: This function is used only with XmlDoc messages, that is, after you get an XmlDoc message (using GetMessageXmlDoc) use this function to determine if the message is active. Use the IsActive message class property to determine if a rowset-based message definition is active.

This function returns True if the message definition for the XmlDoc message is active, False if it’s been inactivated from Application Designer. If you have a lot of PeopleCode associated with publishing an XmlDoc message, you might use this function to check if the message is active before you publish it.

Related Links

IsOperationActive

Parameters

Parameter

Description

Message_Name

Specify the name of the message you want to inquire about. The message name must be prefixed with the reserved work Message. This function is used only with XmlDoc message definitions.

Returns

A Boolean value: True if the message is active, False otherwise.

Example

&Active = IsMessageActive(Message.MyMessage); 
If &Active Then 
   /* code for getting message, populating it and publishing it */ 
End-if;

Syntax

IsModal()

Description

The IsModal function returns True if executed from PeopleCode running in a modal secondary page and False if executed elsewhere. This function is useful in separating secondary page-specific logic from general PeopleCode logic.

Restrictions on Use With a Component Interface

This function is ignored (has no effect) when used by a PeopleCode program that’s been called by a Component Interface.

Parameters

None.

Returns

A Boolean value.

Example

The following example executes logic specific to a secondary page:

If Not IsModal() Or
      Not (%Page = PAGE.PAY_OL_REV_RUNCTL Or
         %Page = PAGE.PAY_OL_RE_ASSGN_C Or
         %Page = PAGE.PAY_OL_RE_ASSGN_S) Then
   Evaluate COUNTRY
   When = "USA" 
   When = "CAN" 
      If Not AllOrNone(ADDRESS1, CITY, STATE) Then
         Warning MsgGet(1000, 5, "Address should consist of at least Street (Line 1), City, State, and Country.")
      End-If;
      Break;
   When-Other;
      If Not AllOrNone(ADDRESS1, CITY, COUNTRY) Then
         Warning MsgGet(1000, 6, "Address should consist of at least Street (Line 1), City, and Country.")
      End-If;
   End-Evaluate;
End-If;

Syntax

IsModalComponent()

Description

Use the IsModalComponent function to test whether a secondary component is currently executing, enabling you to write PeopleCode that only executes when a component has been called with DoModalComponent.

Restrictions on Use With a Component Interface

This function is ignored (has no effect) when used by a PeopleCode program that’s been called by a Component Interface.

Parameters

None.

Returns

Returns a Boolean value: True if the current program is executing from a secondary component, False otherwise.

Example

If IsModalComponent() then
/* Logic that executes only if component is executing modally.  */
end-if;

Syntax

IsModalPanelGroup()

Description

Use the IsModalPanelGroup function to test whether a secondary component is currently executing.

Note: The IsModalPanelGroup function is supported for compatibility with previous releases of PeopleTools. New applications should use the IsModalComponent function instead.

Related Links

IsModalComponent

Syntax

IsModeless()

Description

Use the IsModeless function to return a Boolean value indicating whether the target content for the tile is currently being displayed in a modal window—that is, the Display In setting for the tile is set to Modal.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Syntax

IsNavBarEnabled()

Description

Use the IsNavBarEnabled function to return a Boolean value indicating whether the NavBar button is enabled on the component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If Not (IsNavBarEnabled()) Then
   PT_WORK.PT_BUTTON_NAVBAR.Visible = False;
Else
   If %Request.BrowserDeviceFormFactor = %FormFactor_Small Then
      PT_WORK.PT_BUTTON_NAVBAR.Label = PT_WORK.PT_BUTTON_NAVBAR.GetLongLabel("PT_NAVIGATOR");
   End-If;
   AddStyleSheet(StyleSheet.PTNUI_NAVBAR_CSS);
   AddOnLoadScript("PTNavBar.Url = '" | GetNavBarURL( True) | "';");
End-If;

Syntax

IsNewWindowEnabled()

Description

Use the IsNewWindowEnabled function to return a boolean value indicating whether the new window feature is enabled on the component. If new windows are disabled for the current web profile, then this function always returns False regardless of the component setting.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

&cookieValue = %Request.GetCookieValue("IOS_FULLSCREEN"); /* Do not enable if ios fullscreen */
PT_WORK.PT_BUTTON_NEWWIN.Visible = (IsNewWindowEnabled() And
   Not (&cookieValue = "1"));

Syntax

IsNextInListEnabled()

Description

Use the IsNextInListEnabled function to return a Boolean value indicating whether the Next in List button is enabled on the component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If ( Not (IsSearchEnabled())) Then
   PT_WORK.PT_BUTTON_NEXTLST.Visible = False;
   PT_WORK.PT_BUTTON_RETLST.Visible = False;
   PT_WORK.PT_BUTTON_PREVLST.Visible = False;
Else
   
   If (IsFluidSearchStart() Or
         Not (IsNextInListEnabled())) Then
      PT_WORK.PT_BUTTON_NEXTLST.Visible = False;
   Else
      PT_WORK.PT_BUTTON_NEXTLST.Visible = True;
   End-If;
   If (IsFluidSearchStart() Or
         Not (IsPrevInListEnabled())) Then
      PT_WORK.PT_BUTTON_PREVLST.Visible = False;
   Else
      PT_WORK.PT_BUTTON_PREVLST.Visible = True;
   End-If;
   
   If IsFluidSearchStart() Then
      PT_WORK.PT_BUTTON_RETLST.Visible = False;
   Else
      PT_WORK.PT_BUTTON_RETLST.Visible = True;
   End-If;
   
End-If;

Syntax

IsNotificationEnabled()

Description

Use the IsNotificationEnabled function to return a Boolean value indicating whether the Notifications feature is enabled on the fluid component. This corresponds to the Notifications toolbar option on the component’s Fluid tab.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If IsNotificationEnabled() Then
   &PNAuthorized = IsMenuItemAuthorized(MenuName.PTPNEVENTS, BarName.USE, ItemName.PTPN_POPUP_WINDOW, Page.PTPN_CAT_NOTIFY, %Action_UpdateDisplay);
End-If;

Syntax

IsNotifyEnabled()

Description

Use the IsNotifyEnabled function to return a Boolean value indicating whether the Notify button is enabled on the classic component. This corresponds to the Notify toolbar option on the component’s Internet tab.

Important! Use this function with classic components only. For fluid components in PeopleTools 8.55 or later, use the IsNotificationEnabled function instead.

Parameters

None.

Returns

A Boolean value.

Syntax

IsNumber(Value)

Description

Use the IsNumber function to determine if Value contains a valid numeric value. Numeric characters include sign indicators and comma and period decimal points.

To determine if a value is a number and if it's in the user's local format, use the IsUserNumber function.

Parameters

Parameter

Description

Value

Specify a string you want to search to determine if it is a valid number.

Returns

A Boolean value: True if Value contains a valid numeric value, False otherwise.

Example

&Value = Get Field().Value; 
If IsNumber(&Value) Then 
   /* do numeric processing */ 
Else 
   /* do non-numeric processing */ 
End-if;

Syntax

IsOperatorInClass(operclass1 [, operclass2]. . .)

Description

The IsInOperatorClass takes an arbitrary-length list of strings representing the names of operator classes and determines whether the current operator belongs to any class in a list of classes.

Note: The IsOperatorInClass function is supported for compatibility with previous releases of PeopleTools. New applications should use the IsUserInPermissionList function instead.

Related Links

IsUserInPermissionList

Syntax

ISOToDate(textdatetime)

Description

Use the ISOToDate function to convert the text value textdatetime in ISO 8601 format to a String value in the base time zone. This function automatically calculates whether daylight saving time is in effect for the base time zone.

The system’s base time zone is specified in the PSOPTIONS table.

Parameters

Parameter

Description

textdatetime

Specify a date/time represented as text in the ISO 8601 format: YYYY-MM-DDThh:mm:ss[.S]TZD (for example, 1999-01-01T19:20:30.000000+0800)

In which:

  • YYYY is a four-digit year.

  • MM is a two-digit month (01 through 12).

  • DD is a two-digit day of the month (01 through 31).

  • hh is a two digits of hour (00 through 23).

  • mm is a two digits of minute (00 through 59).

  • ss is two digits of second (00 through 59).

  • S is milliseconds in one or up to six digits.

  • TZD is a time zone designator (Z, +/-hh:mm or +/-hhmm).

Returns

Returns a String value in the base time zone.

Example

In the following example, assuming the base time (as defined in PSOPTIONS) is PST, &DATE would have a Stringvalue of "1999-01-01":

&DATE= ISOToDate("1999-01-01T18:00:00.000000-0800");

Syntax

ISOToDateTime(textdatetime)

Description

Use the ISOToDatetime function to convert the text value textdatetime in ISO 8601 format to a String value in base time zone. This function automatically calculates whether daylight savings time is in effect for the base time zone.

The system’s base time zone is specified on the PSOPTIONS table.

Parameters

Parameter

Description

textdatetime

Specify a date/time represented as text in the ISO 8601 format: YYYY-MM-DDThh:mm:ss[.S]TZD (for example, 1999-01-01T19:20:30.000000+0800)

In which:

  • YYYY is a four-digit year.

  • MM is a two-digit month (01 through 12).

  • DD is a two-digit day of the month (01 through 31).

  • hh is a two digits of hour (00 through 23).

  • mm is a two digits of minute (00 through 59).

  • ss is two digits of second (00 through 59).

  • S is milliseconds in one or up to six digits.

  • TZD is a time zone designator (Z, +/-hh:mm or +/-hhmm).

Returns

Returns a String value in the base time zone.

Example

In each of the following examples, assuming the base time (as defined in PSOPTIONS) is PST, &DATETIME would have a String value of "1999-01-01 18:00:00.000000":

&DATETIME= ISOToDateTime("1999-01-01T18:00:00.000000-08:00");
&DATETIME= ISOToDateTime("1999-01-01T21:00:00.000000-0500");
&DATETIME= ISOToDateTime("1999-01-02T02:00:00.0Z");

Syntax

IsPIIandSensitiveForUser(Record_Name, Field_Name)

Description

Use the IsPIIandSensitiveForUser function to return a Boolean value indicating whether PII or sensitive flags should be ignored for a user.

Parameters

Parameter

Description

Record_Name

Specifies the record name as a String value.

Field_Name

Specifies the field name as a String value.

Returns

A Boolean value.

The IsPIIandSensitiveForUser returns false under three conditions, which are evaluated in the order of appearance. When it encounters the first false, it stops future evaluation.

  • If the record field is not flagged as either PII or sensitive.

  • If the record field is flagged as PII and/or sensitive, but the user has a role that authorizes the PII/Sensitive flags to be ignored.

  • If the record field is flagged as PII and/or sensitive, but the user does not have a role that requires the PII/Sensitive flags to be honored.

Example

&sourcefield = GetField(Field.RECNAME);
If (IsPIIandSensitiveForUser(&sourcefield.ParentRecord.Name, &sourcefield.Name)) Then;
   /*apply masking*/
End-If;

Syntax

IsPinEnabled()

Description

Use the IsPinEnabled function to return a Boolean value indicating whether the Add To (pin) button is enabled on the component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If Not (IsPinEnabled()) Or
      %Request.BrowserDeviceFormFactor = %FormFactor_Small Then
   PT_WORK.PT_ADD_TO_HP.Visible = False;
   PT_WORK.PT_ADD_TO_NAVBAR.Visible = False;
   PT_WORK.PT_ADD_TO_FAV.Visible = False;
Else
   AddStyleSheet(StyleSheet.PTNUI_PINTO_CSS);
   AddJavaScript(HTML.PTNUI_PINTO_JS);
   AddOnLoadScript("portalContextNodeURI = '" | getPortalContextNode() | "';");
   PT_WORK.PT_ADD_TO_HP.JavaScriptEvents = "href=""javascript:PTPinTo.SavePin('LP');""";
   PT_WORK.PT_ADD_TO_NAVBAR.JavaScriptEvents = "href=""javascript:PTPinTo.SavePin('NB');""";
   PT_WORK.PT_ADD_TO_FAV.JavaScriptEvents = "href=""javascript:PTPinTo.SavePin('FAV');""";
End-If;

Syntax

IsPrevInListEnabled()

Description

Use the IsPrevInListEnabled function to return a Boolean value indicating whether the Previous in List button is enabled on the component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If ( Not (IsSearchEnabled())) Then
   PT_WORK.PT_BUTTON_NEXTLST.Visible = False;
   PT_WORK.PT_BUTTON_RETLST.Visible = False;
   PT_WORK.PT_BUTTON_PREVLST.Visible = False;
Else
   
   If (IsFluidSearchStart() Or
         Not (IsNextInListEnabled())) Then
      PT_WORK.PT_BUTTON_NEXTLST.Visible = False;
   Else
      PT_WORK.PT_BUTTON_NEXTLST.Visible = True;
   End-If;
   If (IsFluidSearchStart() Or
         Not (IsPrevInListEnabled())) Then
      PT_WORK.PT_BUTTON_PREVLST.Visible = False;
   Else
      PT_WORK.PT_BUTTON_PREVLST.Visible = True;
   End-If;
   
   If IsFluidSearchStart() Then
      PT_WORK.PT_BUTTON_RETLST.Visible = False;
   Else
      PT_WORK.PT_BUTTON_RETLST.Visible = True;
   End-If;
   
End-If;

Syntax

IsRecFieldPII(Record_Name, Field_Name)

Description

Use the IsRecFieldPII function to return a Boolean value indicating whether the record field is flagged as PII (personally identifiable information).

Parameters

Parameter

Description

Record_Name

Specifies the record name as a String value.

Field_Name

Specifies the field name as a String value.

Returns

A Boolean value. True if the record field is flagged as PII; False otherwise.

Example

&sourcefield = GetField(Field.RECNAME);
If (IsRecFieldPII(&sourcefield.ParentRecord.Name, &sourcefield.Name)) Then;
   /*apply masking*/
End-If;

Syntax

IsRecFieldSensitive(Record_Name, Field_Name)

Description

Use the IsRecFieldSensitive function to return a Boolean value indicating whether the record field is flagged as sensitive.

Parameters

Parameter

Description

Record_Name

Specifies the record name as a String value.

Field_Name

Specifies the field name as a String value.

Returns

A Boolean value. True if the record field is flagged as sensitive; False otherwise.

Example

&sourcefield = GetField(Field.RECNAME);
If (IsRecFieldSensitive(&sourcefield.ParentRecord.Name, &sourcefield.Name)) Then;
   /*apply masking*/
End-If;

Syntax

IsSaveEnabled()

Description

Use the IsSaveEnabled function to return a Boolean value indicating whether the Save button is enabled on the component (on the Internet tab).

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If Not (IsSaveEnabled()) Then
   PT_WORK.PT_BUTTON_SAVE.Visible = False;
End-If;

Syntax

IsSearchDialog()

Description

Use the IsSearchDialog function to determine whether a search dialog, add dialog, or data entry dialog box is currently executing. Use it to make processes conditional on whether a search dialog box is running.

Returns

Returns a Boolean value: True if a search dialog box is executing, False otherwise.

Example

If Not (IsSearchDialog()) Then
   If %Component = COMPONENT.SALARY_GRADE_TBL Then
      If All(SALARY_MATRIX_CD) Then
         Gray(RATING_SCALE)
      End-If;
      calc_range_spread();
   End-If;
End-If;

Syntax

IsSearchEnabled()

Description

Important! In PeopleTools 8.55 or later, use either the IsMDSearchEnabled function or the IsStandardSearchEnabled function instead to determine which type of search is enabled.

Use the IsSearchEnabled function to return a Boolean value indicating whether search is enabled on the component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If ( Not (IsSearchEnabled())) Then
   PT_WORK.PT_BUTTON_NEXTLST.Visible = False;
   PT_WORK.PT_BUTTON_RETLST.Visible = False;
   PT_WORK.PT_BUTTON_PREVLST.Visible = False;
Else
   
   If (IsFluidSearchStart() Or
         Not (IsNextInListEnabled())) Then
      PT_WORK.PT_BUTTON_NEXTLST.Visible = False;
   Else
      PT_WORK.PT_BUTTON_NEXTLST.Visible = True;
   End-If;
   If (IsFluidSearchStart() Or
         Not (IsPrevInListEnabled())) Then
      PT_WORK.PT_BUTTON_PREVLST.Visible = False;
   Else
      PT_WORK.PT_BUTTON_PREVLST.Visible = True;
   End-If;
   
   If IsFluidSearchStart() Then
      PT_WORK.PT_BUTTON_RETLST.Visible = False;
   Else
      PT_WORK.PT_BUTTON_RETLST.Visible = True;
   End-If;
   
End-If;

Syntax

IsSingleComponentAG()

Description

Use the IsSingleComponentAG function to return a Boolean value indicating whether this is a single component activity guide. This function can be invoked from the activity guide wrapper component as well as from the single component that comprises the action items (that is, the pages within that component). The default value is False; the activity guide is not defined as a single component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

Local boolean &bSC = IsSingleComponentAG();

Syntax

IsSingleUnitOfWork()

Description

Use the IsSingleUnitOfWork function to return a Boolean value indicating whether this is a single unit of work activity guide. This function can be invoked from the activity guide wrapper component as well as from any of the components that are defined as action items. The default value is False; the activity guide is not defined as a single unit of work.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

Local boolean &bSUOW = IsSingleUnitOfWork();

Syntax

IsSmallFFOptimized()

Description

Use the IsSmallFFOptimized function return a boolean value indicating whether the tile for this content reference definition has been designated to display on small form factor devices such as smart phones. If this function returns False, this tile will not be available when the user is signed in on small form factor devices.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Syntax

IsStandardSearchEnabled()

Description

Use the IsStandardSearchEnabled function to return a Boolean value indicating whether the search type is set to Standard for the current component.

Important! Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If (IsMDSearchEnabled() Or
      IsStandardSearchEnabled()) Then
   PT_WORK.PT_BUTTON_SUBMIT.Visible = False;
   /* Some additional processing */
Else
   PT_WORK.PT_BUTTON_BACKS.Visible = False;
   If &tfld <> Null Then
      &tfld.Visible = False;
   End-If;
End-If;

Syntax

IsTime(Value)

Description

Use the IsTime function to determine if Value contains a valid Time.

You can use this function when you want to determine if a value is compatible with the Time function.

Parameters

Parameter

Description

Value

Specify either a string or number you want to search for to determine if it's a valid Time.

Returns

A Boolean value: True if the string contains a valid Time value, False otherwise.

Example

If IsTime(&Num) Then 
   &Timevalue = Time(&Num); 
End-if;

Syntax

IsUserInPermissionList(permissionlist1[, permissionlist2]. . .)

Description

Use the IsUserInPermissionList function to return a boolean value indicating whether the user is a member of any of the specified list of permission lists.

This function also returns true when an alias exists for a permission list and the user is a member of the permission list alias. See Using Role and Permission List Aliases.

Parameters

Parameter

Description

permissionlist1[, permissionlist2]. . .

A comma-separated list of string values, each representing a permission list.

Returns

Returns a boolean value: True if the current user has access to one or more of the permission lists, False otherwise.

Example

If IsUserInPermissionList("PTPT1300", "PTPT1600") Then

Syntax

IsUserInRole(role1[, role2]. . .)

Description

Use the IsUserInRole function to return a boolean value indicating whether the user is a member of any of the specified list of roles.

This function also returns true when an alias exists for a role and the user is a member of the role alias. See Using Role and Permission List Aliases.

Parameters

Parameter

Description

role1[, role2]. . .

An arbitrary-length list of strings, each of which represents a role.

Returns

Returns a boolean value: True if the current user belongs to one or more of the roles, False otherwise.

Example

While &selectSQL1.Fetch(&sRoleNames)
   If (IsUserInRole(&sRoleNames) = True) Then
      &found = &sRoleNames;
      Break;
   End-If;
End-While;

Syntax

IsUserNumber(Value)

Description

Use the IsUserNumber function to determine if Value contains a valid numeric value that uses the locale-specific form of the number for the current user. Numeric characters include sign indicators and comma and period decimal points.

For example, if your regional settings specified periods for the thousands separator, and the number uses commas, this function returns false.

To determine if a value is a number regardless if it's in the user's local format, use the IsNumber function.

Parameters

Parameter

Description

Value

Specify a string you want to search to determine if it is a valid number in the correct format.

Returns

A Boolean value: True if Value contains a valid numeric value in the correct format, False otherwise.

Example

&Value = Get Field().Value; 
If IsUserNumber(&Value) Then 
   /* display number */ 
Else 
   /* do other processing */ 
End-if;