Passing a parameter from a Form to a Blank application.

Hi,

I have an Invoice Form and a printable Invoice in a Blank application. I want to have a button in the Form to open the blank application with a parameter (InvoiceNo). I tried adding a Javascript-Button with the following code:

Window.open("../blank/blank.php?invoiceno =23")

The blank application opened fine with invoice number 23.

But when I changed the javascript to pass the field value as a parameter like this:

Window.open("../blank/blank.php?invoiceno={invoiceno}")

It opened the blank application with no data. And the URL in the browser address bar looked like this:

http://127.0.0.1/blank/blank.php?invoiceno={invoiceno}

I also tried

blank.php?invoiceno=.{invoiceno}

So how can I send the invoice number from the form to the blank application?

Thanks in advance

MB

Re: Passing a parameter from a Form to a Blank application.

you have to change it to
http://127.0.0.1/blank/blank.php?invoiceno={invoiceno}

then you will get a url like
http://127.0.0.1/blank/blank.php?invoiceno=’$this ->invoiceno’

Re: Passing a parameter from a Form to a Blank application.

Thanks Gerd for the reply.

But unfortunately it is not passing the invoice number. The browser address bar is showing:

http://127.0.0.1/blank/blank.php?invoiceno=’{invoiceno}’

Do you ahave any other ideas?

Thanks

Re: Passing a parameter from a Form to a Blank application.

Well what i do is placing a variable in the onScript init:
[var_invoiceno] = ‘’;
define it under APPLICATION - GLOBAL VARIABLE as OUT

in your blank.php place the variable onExecute

and define it as IN

then call your App with

Window.open("…/blank/blank.php?var_invoiceno={invoiceno}")

So it works for me !

Re: Passing a parameter from a Form to a Blank application.

Thanks Gerd

It worked , BUT

It is only getting invoiceno 1.

When I go to the next invoice in the form and open blank.php , It seems the variable [var_invoiceno] is not being set with the current invoiceno value. The form keeps passing the first invoiceno to the Blank.php application.

Is there a way to set the [var_invoiceno] with value of the current record in the Form?

Thanks again Gerd

Re: Passing a parameter from a Form to a Blank application.

When you scroll to a next record you could use an event to assign the database value to the global variable. I’m not sure yet which event get’s fired but I would try onnavigate.

Re: Passing a parameter from a Form to a Blank application.

i did not try it, but i think you could reset your variable in the onNavigate to [var_invoiceno] = ‘’;