cancel
Showing results for 
Search instead for 
Did you mean: 

Delete space in between textboxes

siongchao_ng
Contributor
0 Kudos

Hi all,

In my adobe forms, I have the following layout:

ABC Company Limited,

(Formerly known as XYZ Limited)

123 Street, Old Trafford,

Manchester.

Now, the form is shared by 2 different company. If the company code is another company I will have the following problem.

There is a gap between the company name and address.

BBB Company Limited,

555 Street, Ahsverton Grove,

London.

In my adobe form, I put the textbox of  " Formerly knows as XYZ Limited" in a subform. I set the subform content to "Flowed"

In my script, I put in the following under the event:

data.#pageSet[0].Page1.ZCOMPANY_FORMER_NAME_SUBFORM::ready:layout - (FormCalc, client)

if $.record.zcompany_former_name == '' then

   $.presence = "hidden"

endif

It is not working. The gap is still there when I print out the BBB Company. What else could be wrong?

Accepted Solutions (1)

Accepted Solutions (1)

siongchao_ng
Contributor
0 Kudos

Hi all,

Thanks for your help.

My colleague found out that that the standard program SAPFM06P which call this particular custom adobe form did not pass in the outputparams-dynamic = 'X'. Thats is why I cannot seems to move up my textboxes using formcalc.

Answers (1)

Answers (1)

navip
Active Participant
0 Kudos

Take a table with 4 rows and and wrap the table in a subform with property as Flowed.

Then bind each row with the text..

Ex: 1st row ABC Company Limited,

      2nd row (Formerly known as XYZ Limited)

      3rd row 123 Street, Old Trafford,

      4th row Manchester.

select the row "(Formerly known as XYZ Limited)" and write the below code:

if  ( $.record.zcompany_former_name ==  null ) then

      $.presence = "hidden"

endif

---

Naveen

siongchao_ng
Contributor
0 Kudos

Hi Naveen,

Have to use textfield for each line of text. I put every textfield under 1 single subform. Set the subform content to "Flowed"

Set the script as followed:

data.#pageSet[0].Page1.COMPANY_NAME.ZCOMPANY_FORMER_NAME::ready:layout - (FormCalc, client)

if ($record.zcompany_former_name == null) then

   $.presence = "hidden"

endif

Not working. Is the script under the wrong event ready:layout? Or have to be under different event?

Former Member
0 Kudos

Hi Naveen,

Try to store the second row data into a single variable(lets say Var).

Lets create another variable , where will check whether second row(.i.e Variable Var) is returning something or not .

If second variable is Null then will Hide that row else row will show the desire output.

Thanks & Regards,

Jigar Shah.

navip
Active Participant
0 Kudos

Please check the script:

You have mentioned the script as below:

if ($record.zcompany_former_name == null) then

   $.presence = "hidden"

endif

it  should be:

if  ( $.record.zcompany_former_name ==  null ) then

      $.presence = "hidden"

endif

period is missing in your case and please don't copy and paste the code, try to write the code and see that "record.zcompany_former_name" is populated after $.

Edit: And please be advised that if the text feilds are displayed in the design view, then you should write the FormCalc in form:ready* and if the text fields are displayed in the Master Page, write the FormCalc in layout:ready* event.

---

Naveen

siongchao_ng
Contributor
0 Kudos

Hi Naveen,

Thanks for your answer.

Actually when  I typed $. a popup will appear and i browse to the letter 'R' looking for record. However, there is no record so I just copy and paste the code "record.zcompany_former_name" after $.

navip
Active Participant
0 Kudos

Don't look for 'R', just look for zcompany_former_name after $.

Edit: Please let me the exact field name( whether it is record.zcompanyxxxxx or zcompanyxxxxxx)?

---

Naveen

siongchao_ng
Contributor
0 Kudos

Hi Naveen,

My fieldname zcompany_former_name is not found inside the poupbox after $.

0 Kudos

Hi

You can try with java script in event INITIALIZE

E.g  Name3 is my text field element

Select java script Client side

data.coverpagePT.ardc_cpage.NAME3::initialize - (JavaScript, client)

  Write below script as it is it will work.

this.presence = (this.rawValue == null) ? "hidden" : "visible";

Pleasr try with this.

Thanks,