Help with link to a form

Hy
I have a form application F based on a table T with primary key field P.
Normally when I create a link to F using the scriptcase link interface I am asked to specify a value for P.
So far.so good.

But what if I want to create a link dynamically using sc_redir macro in order to open F on a specifc record ?

I have no possibiliy to specify a value for P in sc_redir macro.
I must create a global IN varibale for F , say [V], and modify the sql where clause for F adding the sql code
where P=[V]

This is ackward, because now every time I use the scriptcase interface to create a link to form F I have to put twice the same data, once P and once V.

Any clue ?

Hi
you can use
sc_redir(app, parameter=“value”);

In the app you can use [parameter] as part of the where condition where P=[parameter]

other option is used a global variable with the current value of P and then use it in the where condition

regards

In sc_redir parameter must be a global variable in the called app, it cannot simply be a primary key of the table
What I dont understand is why I have to create a parameter as a global var when the primary key is already there

you’re right, I didn’t realize that it is defined as global variable

Thanks anyway for trying to help