cancel
Showing results for 
Search instead for 
Did you mean: 

Read Only fields in HCM PF

Former Member
0 Kudos

Hi,

I have developed one HCM P&F process.

When i execute the process thru portal:

Step1: Fill form: Here i fill values in all the fields which are input disabled.

Step2: When i do check& send, the form goes to next step(Send).

At this point, when we click send to finish the process, my requiernmrnt is:

The input fields are still input enables.

Here i want all the fields should become read only. How should i achieve this. Please suggest.

Regards,

Ashish Gupta

Accepted Solutions (0)

Answers (2)

Answers (2)

seVladimirs
Active Contributor
0 Kudos

Hi,

Use this FormCalc code for each field which must be locked.


if ($record.FORM_SCENARIO_STAGE.DATA[*].FIELD != "FSS_1") then
 this.access = "readOnly";
endif

Where FSS_1, your scenario step name.

Edited by: earnestik on Oct 7, 2009 11:00 AM

Edited by: earnestik on Oct 7, 2009 11:00 AM

Edited by: earnestik on Oct 7, 2009 11:00 AM

Former Member
0 Kudos

Hi

Write the following code in Form ready event.


if($record.CONTROL_PARAM.ISR_MODE == "DISPLAY" |
   $record.CONTROL_PARAM.ISR_FORM_VIEW =="ISR_APPROVE" ) 
then 
	this.access = "readOnly"
else
	this.access = ""
endif

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Mukesh,

Thanks a lot for the support!!

I have written the scripting logic suggested by you. It works for event ISR_APPROVE but for DISPLAY it is not working. Not sure why, i compared the code with standard forms also but still not able to ake out. Is there any trick in this??

Ragards,

Ashish Gupta

Former Member
0 Kudos

Hi

If you overwritten the editable property in more than one event it will be give this problem (I have faced this)

So don't write the script for the editable property at more than one place (event). Choose one place as form ready or layout ready.


if($record.CONTROL_PARAM.ISR_MODE == "DISPLAY" |
   $record.CONTROL_PARAM.ISR_FORM_VIEW =="ISR_APPROVE" ) 
then 
	this.access = "readOnly"
else
	if($record.FORM_SCENARIO_STAGE.DATA[*].FIELD == "FSS1_LM"  )
	then
		this.access = ""
	else
		this.access = "readOnly"
	endif
endif

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Mukesh,

Thanks again.

Just a small confusion: form scenario stage FSS1_LM, i need to write the default scenario stage here for my form.. correct?

Regards,

Ashish Gupta

Former Member
0 Kudos

Hi

Yes, depending on your custom scenarios.

Kind Regards

Mukesh

Former Member
0 Kudos

But when we press, Check& Send, the form scebario stage remains same, am i correct? Then how will it work...

Former Member
0 Kudos

Hi

During the send the ISR_MODE will be DISPLAY. So it will work.

Are you still facing the problem?

Kind Regards

Mukesh

Former Member
0 Kudos

Yep.. still same issue

Former Member
0 Kudos

can i debug and check this

Former Member
0 Kudos

Hi

Use xfa.host.messageBox($record.CONTROL_PARAM.ISR_MODE)

and check the value for $record.CONTROL_PARAM.ISR_MODE after pressing check button.

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Experts

I am still facing the same problem.

Still all teh fields are editable on Send option and also when i see the from on Approval step.

When i click on "CHECK and SEND" button, the form goes to next stap in road map but all the fields are still editable. I have checked the scripting also but still the error is coming.

I have used xfa.host.messageBox($record.CONTROL_PARAM.ISR_MODE) to check the ISR_MODE when i click on Check and Send button. It gives me value "Create".

Please help.

Thanks,

Ashish Gupta

MarcoKobel
Explorer
0 Kudos

Hi there!

We are facing exactly the same issue.

Did you find a solution?

Thanks for any help

Marco Kobel

MarcoKobel
Explorer
0 Kudos

Found the solution in the following Thread: [|]

Thanks

Marco