cancel
Showing results for 
Search instead for 
Did you mean: 

Using Javascript/FormCalc access value of a Column of a Table

agnihotro_sinha2
Active Contributor
0 Kudos

Hi,

I need to access the value of a Column in a table (GT_TOTAL) in my form.

My form is displaying this table. Only when value of column C5 is "0.00" i want to make it disappear.

How do i do this using either JJavascript or Formcalc??

Ags.

Accepted Solutions (0)

Answers (1)

Answers (1)

chintan_virani
Active Contributor
0 Kudos

Do you want to make the whole table disappear or a certain field?

Also the column won't have any value, a certain row in that column c5 will have that value, correct?

Chintan

agnihotro_sinha2
Active Contributor
0 Kudos

ya certain rows of that column will have values not all.

based on these values i want to hide it.

i dont want the whole table to dispappear.

ags.

chintan_virani
Active Contributor
0 Kudos

Will this be a dynamic table or a static table?

Chintan

agnihotro_sinha2
Active Contributor
0 Kudos

Its a static table since this will have the values passed from Interface

ags.

chintan_virani
Active Contributor
0 Kudos

What I meant to ask was

Dynamic means no.of rows will vary i.e it can be 1 or 5 or 50 any value.

Static means you know how many rows of data you will have i.e it can be 1 or 5 or 50 any value.

Assuming it is static and it would return me two rows, in the form:ready event of the main subform change the language to JavaScript and enter following code:-

if(Table1.Row1.Cell1.rawValue == "0.00")
{
	Table1.Row1.Cell1.presence = "hidden";
}

You can write similar statments for other cells and rows as well.

You can even write a for loop, let me try to work on it.

Chintan

agnihotro_sinha2
Active Contributor
0 Kudos

hi,

i surely like the approach you have given but you know while i was working on it somehow i came accross following keys and it seems to work:


If ($.rawvalue = "0.00") then
$.presence = "hidden"
endif

this seems to work fine.

any clue whats the difference between thses two approaches?

thanks a lot,

ags.

chintan_virani
Active Contributor
0 Kudos

The difference is that the code you have provided is in FormCalc (Adobe default language) and mine being JavaScript.

Chintan