cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying fields in HCM process & Forms

Former Member
0 Kudos

Hello,

My requiernmrnt is:

I have 4 fields on form:

1) Action

2) Action reason

3) Date1

4) Date2

Date1 and Date2 are hidden by default. Date1 and Date2 should be visible based on selection of Action.

Example: If Action selected is 01, then only Date1 should be displayed. If Action selected is 02, then only Date2 should be displayed and if Action selected is 03, then both Date1 and Date2 should be displayed.

Please suggest how to achieve this functionality. Is there any event which gets triggred once Action is selected from drop down list so that i can write scripting logic at that event or is there any othr way to achieve this functionality?

Regards,

Ashish Gupta

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I assume in Action dropdown exit* event, you would need to trigger round trip to backend to populate value for Action Reason dropdown and the js/formcalc code you implement in this to change the visibility of both date field will get initialize.

Thus, you should implement the code to control the visible of both date field in initialize* event of Action ddl.

I just giving you the general idea how it works. Let me know if you need further explanation.

regards,

Prakesh.

Former Member
0 Kudos

In the event exit of Action dropdown write the logic.

Hi,

Try this


// check the value of the Action

if($record.<MASSN>.DATA[*].FIELD == "01")
then
//set Visible for date1 and date2
   data.<Page>.<container>.<field1>.presence = "visible"
   data.<Page>.<container>.<field2>.presence = "hidden"
else if($record.<MASSN>.DATA[*].FIELD == "02") then
  data.<Page>.<container>.<field1>.presence = "hidden"
  data.<Page>.<container>.<field2>.presence = "visible"
else if($record.<MASSN>.DATA[*].FIELD == "03") then
  data.<Page>.<container>.<field1>.presence = "visible"
  data.<Page>.<container>.<field2>.presence = "visible"
endif
endif
endif

Kind Regards

Mukesh

Edited by: Mukesh mani on Oct 4, 2009 3:23 PM