on 01-24-2008 6:04 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.