isdigit function peoplecode

isdigit function in peoplecode

isdigit function peoplecode

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.

Syntax : IsDigits(String)

String : Specify the string you want to search.

Example

&TAX_ID = COMPANY_AFF.TAX_ID;
&len = Len(&TAX_ID);

rem WinMessage(&TAX_ID | “,” | &len, 0);

If IsDigits(&TAX_ID) = True And
&len = 13 Then
Else
Error “Please input digit number = 13”;
End-If;

How to use Fetchvalue Peoplecode

Fetchvalue Peoplecode

FetchValue() = FetchValue returns the value of a buffer field in a specific row of a scroll level.

Using fetchvalue in scroll area level when code at fieldchange of record.field in scroll area

Code at fieldchange of record.filed in scroll area or grid at level 1

&companycode = FetchValue(Table_Nmae.COMPANY_ID);

Syntax: FetchValue(scrollpath, target_row, [recordname.]fieldname)

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 levels primary record name.

Description
Use the FetchValue function to return the value of a buffer field in a specific row of a scroll level.

Note: This function remains for backward compatibility only. Use the Value field class property instead.

This function is generally used to retrieve the values of buffer fields outside the current context; if a buffer field is in the current context, you can reference it directly using a [ recordname .] fieldname expression.

Definition

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

target_row:    An integer specifying the row on the target scroll level where the referenced buffer field is located.

[ recordname .] fieldname: The name of the field where the value to fetch is located. The field can be on scroll level one, two, or three of the active page. The recordname prefix is required if the call to FetchValue is not on the record definition recordname.

How to disable/gray radio button peoplesoft

How to disable/ gray radio button peoplesoft

By javascript

Disable Radio Button

when disable radio button = N

Place htmlarea in this pag and input thise javascript

<script>
document.getElementById(‘KTB_FLAG’).disabled = true;
</script>

or using code by parameter

KTB_DERIVED.HTMLAREA.Value = GetHTMLText(HTML.HIDE_RD_BTN, “FLAG_N”, “true”);

when HTML.HIDE_RD_BTN

<script>
document.getElementById(‘%bind(:1)’).disabled = %bind(:2);
</script>

Result

Disable Radio Button Javascript

 

How to change label record by PeopleCode

You can use this PeopleCode to change the label name by condition.

Example 1:

RecordName.FieldeName.Label = ‘Label Name’;

  • Change label from message catoloag

Example 2:

SQLExec(“SELECT message_text FROM PSMSGCATLANG WHERE message_set_nbr =’10003′ AND message_nbr =’13′”, &Txt_Lable);

RecordName.FieldeName.Label =&Txt_Lable;

Example 3:

&Cnt =1;

If &Cnt > o then

SQLExec(“SELECT message_text FROM PSMSGCATLANG WHERE message_set_nbr =’10003′ AND message_nbr =’13′”, &Txt_Lable1);

RecordName.FieldeName.Label =&Txt_Lable1;

else

SQLExec(“SELECT message_text FROM PSMSGCATLANG WHERE message_set_nbr =’1000′ AND message_nbr =’3′”, &Txt_Lable2);

RecordName.FieldeName.Label =&Txt_Lable2;

end-if;

How to change group box label by PeopleCode

Change group box label using PeopleCode

You can change the group box label by PeopleCode.

GetPageField(%Page, “YOURGROUPBOXFIELDNAME”).Label = “Label your grid”;

The above coding has many advantages: Can increase the number of characters more than the system specified on the group box on page PeopleSoft.

 

peoplecode close current window

peoplecode close current window

how to peoplecode close current window by javascript

  • Example 1: If you want close window from link

<script language=’JavaScript’>
function close_win0()
{
top.window.close();
}
</script>

<input type=’url’ name=’Quit’ id=’Quit’
value=”close window” ” onclick=”close_win0();” />

  • Example 2: If you want close window from button

<input type=’button’ name=’Quit’ id=’Quit’
value=”close window” ” onclick=”close_win0();” />

  • Example 2: If you want close window from hyperlink

<a href=”javascript:close_win0();”>Close Window</a>

How to hide relate field peoplecode

How to hide relate field peoplecode

Hide relate filed peoplecode in level 0

&fldCtrl = GetRecord(Record.PERFNW_RUN1).GetField(Field.EMPLID);
&fldRelated = &fldCtrl.GetRelated(EMP_NAME.DESCR100);
&fldRelated.Visible = False;

Hide relate filed peoplecode in level 1

Local Rowset &rsLvl1 = GetLevel0()(1).GetRowset(Scroll.CNTRC_TRAN);
Local Field &fldCtrl, &fldRelated;rem loop through each row in the grid;

rem WinMessage(&rsLvl1.ActiveRowCount, 0);
For &j = 1 To &rsLvl1.ActiveRowCount;

rem get the control field;
&fldCtrl = &rsLvl1(&j).GetRecord(Record.CNTRC_TRAN).GetField(Field.EMPLID3);

rem now get the related display field;
&fldRelated = &fldCtrl.GetRelated(EMP_NAME.DESCR100);
WinMessage(&fldRelated.Value, 0);

&fldRelated.Value = “”test_related_feild””;

&fldRelated.Visible = True;

End-For;

How to hide relate field in peoplecode

How to hide relate field in peoplecode

How to change font color PeopleCode

How to change font color PeopleCode

You can change the font color PeopleCode using function “style”.  For example, my requirement have to check the status. If status = E then change style font field EMPLID and Relate field of empid in column grid PeopleSoft to color fo style equal  PSMULTILANG.