cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Subform display problem(URGENT)

Former Member
0 Kudos

Hi Experts,

I have a requirement......I am passing 3 tables from interface to form layout...I want to display data from these tables to different subforms based on some condition

for ex...........

table T1 passing to subform S1

table T2 passing to subform S2

table T3 passing to subform S3

My requirement is these subform should be display only based on some condition like if some value is there in table T1 then only S1 subform should be display otherwise not.

Please suggest me what script i will write for this.

Regards

Gaurav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gaurav,

Use the similar code as below on each subform.

Var record_count = $.table.data.all.length

For I = 0 upto ( record_count - 1 ) step 1 do

Statements ( here add the conditions and the statements whatever you want to perform for each record with in the table)

flag some variable if u find the require value.

Endfor

if flag is not intial.

hide the subform.

pavan meda

Former Member
0 Kudos

Hi Pavan,

Thanks for reply.......but in which event i will write this code for subform.

please give me a sample example or any standard form name from where i can take help.

Gaurav

Former Member
0 Kudos

Hi,

You have to write in form calc under form ready event.

As of now, i dont have any system to check.You can check any standard forms like vendor statement / customer statement which have page totals.

for example, drag the S1 subform into one more sumforn with flow content say SS1.Write the below (similar) code.

// get total number of records

Var record_count = $.Table1.data.all.length

Var flag

Var value_check = '222'

For I = 0 upto ( record_count - 1 ) step 1 do

if $.Table1.data<i>.field1 = = value_check

flag = 'X'

endif

Endfor

if flag = = 'X'.

$.S1.presence = "hidden"

endif

Please check the syntax.

pavan meda

Answers (0)