on 02-17-2010 7:46 AM
hello,
is it possible to hide an object on a masterpage dynamically?
I tried to define a formula in the script editor with FormCalc, but it doesn't work. I made a similiar definition within the content area and this definition is working.
It is a HCM form and the following formular is defined in the initialization event of the object:
if( Exists($record.DIM_EMPLOYEE.DATA[*].FIRE_DATE[0]) == 0 ) then
$.presence = "hidden"
endif
Can anybody help me , please?
Regards,
Tanja
By the way: do you know that CTRL+V function of LCD to fwrite the qualified name for you? Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well YES it is possible to hide an object of master page. Couple of things you can try:-
1. Use quotes around zero. i.e.
if( Exists($record.DIM_EMPLOYEE.DATA[*].FIRE_DATE[0]) == "0" ) then
2. Use fully qualified names for the object of Master Page and place the event in form:ready event of the subform instead of master page.
Also I tried a small example and it worked. Sample Hierarchy is shown below
form1
|-- Master Pages
|-- Page1
|-- Content Area
|-- TextField1
|-- (untitled subform) (page1)
|-- TextField2
JS code on the exit event of TextField2
form1.#subform[0].TextField2::exit - (JavaScript, client)
if(this.rawValue == "1")
{
form1.pageSet.Page1.TextField1.presence = "hidden";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe you can utilize some of the ready-to-use examples here:
http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
Regards, Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works only on client and JavaScript. Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the a-l-e-r-t statement doesn't work within my form. For testing I put
a-l-e-r-t("TEST") // without the -
if( Exists($record.DIM_EMPLOYEE.DATA[*].FIRE_DATE[0]) == 0 ) then
$.presence = "hidden"
endif
to my script. The script runs with FormCalc and on the server.
I also tried the "javascript version ":
a-l-e-r-t("TEST"); // without the -
this.presence = "hidden";
But it doesn't work.
Probably it is an syntax problem. I am a beginner in scripting language.
thanks,
Tanja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is easy. Use app.a-l-e-r-t("meesage") or (variable) to get a debug popup. Note I cannot write that al-ert because it disturbs this pages logic, so please omit the "-i" mark. Hope this helps, Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
thanks for the fast reply.
If I only define the hidden statement, it works. How can I debug the form, to get the value or the format of the value at the runtime?
I tried a lot of format variations to compare with the fire_date.
I use a copy of the SAP Standard SAP_PAYSLIP_DE_P of HCM forms.
Regards,
Tanja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
in fact I don´t know if that is possible, but it should be pretty easy to try.
Place JS like: this.presence = "hidden"; on the master page element you want to hide, use event like initialization for example. This only tests if there was an error in your coding.
I am looking forward to the result of this test or anybody else saying if that is possible.
Regards, Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.