cancel
Showing results for 
Search instead for 
Did you mean: 

hidding fields in subform and collapse the area

Former Member
0 Kudos

Hi Folks,

I am working on Print Scenario form.

In my layout I have a subform in which I have 5 fields. Based on some values I have to hide the fields and also exclude those fields from layout .

I have written java script for that but when I checked in the preview the fields are getting hide but the area doesnot get collapsed.

I have made the Subform content property as flowed and top to bottom.

Can anybody tell me where I am going wrong.

Regards

Sandipan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Select the width of the subform as Expand to fit .

Thanks.

UmaS.

Former Member
0 Kudos

Hi Das,

You have all the fields in a subform Say "A".

This subform would be in another subform right say "B", make this subform as flowed top to bottom

when you need to make the fileds hidden also make the subform "A" as hidden.

Then the area is auto wrapped up.

Does this helpful..? Try it and let me know if you need any further help.

Regards,

Sai

Former Member
0 Kudos

Hi Sai,

I want to wrap up the area of subform A not B.

In my case I have put 5 fields in the subform.If these fields have values then I have to print those fields and if it doesnt have any value then wrap up the area.

Could you suggest on this.

Former Member
0 Kudos

Hi Das,

Thats whta the solution is i posted.

its simple that you have sbfB>SBF A>individual fields.

So here the parent is B (flowed) and child is A.

So when you know youshouldn't display the fields just hide the subform A.

Cheers,

Sai

Former Member
0 Kudos

Hi Sai,

I have done the same thing as you suggested but still its hiding the field but not wrapping up the area.

These fields are in the master page.

The master page has a subform say A and The 5 fields are in the subform Say B .

Subform A is of Content is Positioned and subform B has content property as Flowed and top to bottom.

I have wrapped the 5th field in Subform C which has content property as positioned .

And I written a code on the Subform C 's layout ready event to hide the 5th field i.e. I am making the presence of Subform C as hidden .But still it is not wrapping up the area in Subform B.

Can u tell me where I am going wrong.

Former Member
0 Kudos

Hi Das,

Your design seems to be ok, just check the following...

Make sure the Height of the Subform A is set to Auto.

Put the script in Formready event, make sure are you setting the presence for the subform C or to the field in subform.

It should be set to the subform rather to the field.

Can you post the script or send me the form to check ..?

Cheers,

Sai

Former Member
0 Kudos

Hi Sai,

I am writing the Script on the subform as

if ($record.line1.value = = null )

{

this.presence = "hidden";

}

I have observed the area gets collapsed in the body pages.

If you try out the things of hiding and wrapping up the area at Master page it doesnt work.The field get hide but it does not wrap up the area.

if you have any sample exmaple with you where you are doing the same thing can you send me that.

Former Member
0 Kudos

This message was moderated.