cancel
Showing results for 
Search instead for 
Did you mean: 

FormCalc Change table field

Former Member
0 Kudos

Hi all,

I have one PDF-based form not interactive.

In this form I want change one field of one table.

I have one table Itemtable with 3 columns.

Process will be:

If cloumn 1 is empty and the column 2 is filled, I want move the value from column 2 to column 3.

I want do it in Formcalc.

Can you help me???

Thanks in advance.

Ana

Accepted Solutions (1)

Accepted Solutions (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi Ana,

If the no. of rows are dynamic, write the following script at the form:ready event of the table:

var i
for i = 0 upto 2 step 1 do
if ( Row<i>.Cell1.rawValue == "" and Row<i>.Cell2.rawValue <> "" )
then
	Row<i>.Cell3.rawValue = Row<i>.Cell2.rawValue
	Row<i>.Cell2.rawValue = ""
endif
endfor

here I am considering the table in the following format:

Row:_____________________________________

Cell1

Cell2

Cell3

__________

______________

____________

And if the no. of rows are fix then you have to write the following script at the same event of table but for all the rows separately.

if ( Row1.Cell1.rawValue == "" and Row1.Cell2.rawValue <> "" )
then
	Row1.Cell3.rawValue = Row1.Cell2.rawValue
	Row1.Cell2.rawValue = ""
endif

if ( Row2.Cell1.rawValue == "" and Row2.Cell2.rawValue <> "" )
then
	Row2.Cell3.rawValue = Row2.Cell2.rawValue
	Row2.Cell2.rawValue = ""
endif

here I am considering 2 rows.

Hope it will solve your problem.

Regards,

Vaibhav Tiwari.

Answers (1)

Answers (1)

Former Member
0 Kudos

Ana,

Did u solve the issue? If so can you please post the solution here with formcalc/javascript code?

BM