Skip to main content
Known Participant
June 25, 2023
Question

Table with invalid parameter

  • June 25, 2023
  • 3 replies
  • 1236 views

Hello good. I have a form with a dropdown list, with several documents that when selected are displayed. So far so good, but when I go back to the option "SELECT AN OPTION" the box appears saying "invalid parameter".
I don't know why it comes out since everything is going well and fluid. Let's see if someone knows how to solve it or has the same thing happen to them.

Thank you all.

This topic has been closed for replies.

3 replies

Bernd Alheit
Community Expert
Community Expert
July 3, 2023

I don't get the message "invalid parameter".

In the Javascript console I get this:


TypeError: f is null
1282:byteCodeTool
TypeError: f is null
1282:byteCodeTool
TypeError: f is null
1282:byteCodeTool
TypeError: f is null
1282:byteCodeTool
TypeError: f is null
1282:byteCodeTool
TypeError: f is null
1282:byteCodeTool
TypeError: f is null
1282:byteCodeTool

Known Participant
July 3, 2023

And all those errors, how can I correct them?

Bernd Alheit
Community Expert
Community Expert
July 3, 2023

Check the calculations in the fields. There you use non existing fields.

Bernd Alheit
Community Expert
Community Expert
June 27, 2023

Can you share the file?

Known Participant
July 1, 2023

Sent

Bernd Alheit
Community Expert
Community Expert
June 26, 2023

What script does you use at the dropdown?

Known Participant
June 26, 2023

One moment, please

Known Participant
June 26, 2023

It would really be something like this:

 

var a = this.getField("A").getArray();
for(var i in a)
{a[i].display = event.value == "DOCUMENTO A" ? display.visible : display.hidden;}

var b = this.getField("B").getArray();
for(var i in b)
{b[i].display = event.value == "DOCUMENTO B" ? display.visible : display.hidden;}


var t1 = this.getTemplate("plantilla1");
var t2 = this.getTemplate("plantilla2");


var p = Number(this.numPages)-1;
if(this.numPages != 1)
this.deletePages(1,p);

if (event.value == "DOCUMENTO A")
t1.spawn(numPages, false,false);

if (event.value == "DOCUMENTO B")
t2.spawn(numPages, false,false);