How can I write on another form field having recorded a value on Glo_var (sc_redir ?)

Dear all,

I’m trying to move a text value from a control form to a single form field.
i.e.
FORM1
field: id
field: note (text)
field: icon (html image who links CONTROL1)

CONTROL1
field: txt (text)

When I click on ICON I open the CONTROL1 form. I insert a text value and then I confirm it with OK button.
OnValidateSuccess Event I wrote something like this.

[txt_var]={txt};

$redir_app = ‘form_activities.php’; // Application name
$redir_test = ‘{note}’ == ‘[txt_var]’; // Redirection test
$redir_target = ‘_blank’; // Target window (_blank, _self, _parent or modal)
$redir_param = [txt_var];

sc_redir($redir_app, $redir_param , $redir_target);

Here I’m stucked becouse I don’t know how to use the Glo_Var in order to update the “note” field of “form_activities” form.

??? More or less something like --> form_activities.{note}=[txt_var]; The syntax is not correct but just to understand the concept.
Where I have to write it ?? On CONTROL1 or FORM1 ??
Many thanks
Giovannino

Hi!

In control form:
sc_redir(form_activities.php, note = {yourTextFieldToBePassedtoForm1}, “_blank”);

In form 1:
you retrieve the {yourTextFieldToBePassedtoForm1} value using [note] variable in Form 1.

Thanks for suggestion.
Just last doubt . How can I see directly [note] on its field ?
I mean when I close CONTROL1 coming back to FORM1 I would like to see note field populate with [note] value.
Have I to use a particular Event ?

[QUOTE=giovannino;11698]Thanks for suggestion.
Just last doubt . How can I see directly [note] on its field ?
I mean when I close CONTROL1 coming back to FORM1 I would like to see note field populate with [note] value.
Have I to use a particular Event ?[/QUOTE]

I am not sure if you mean you want a field in Form 1 to have the value of [note] after it is redirected.
You can try:
go the the field in Form1 (where you want the value of [note] to appear)and there you can select “defined value” in Initial Value (type) and after that [note] in Initial Value field.

Second option would be in onLoad event …
{form1Field} = [note]

Hope it works!

ok !!! I’ve choosed the second one and seems to work.
The only last thing is that I remain with two forms opened and it’s not so nice.
FORM1 --> Click on Icon —> CONTROL1 —> OK
At this point I have the original still open and a second one probably opened by the sc_redir(form_activities.php, [txt_var] = {txt}, “_blank”); command.
Is it easy to fix ?
Thanks again

_parent seems to do the job !!!

Excuse me,
Now the testing sample works but now I need to implement it on a editable grid.
If the starting form is a editable grid form how can I , clicking on the icon of a row, to make the same trick ?
I did an try but now when I come back from CONTROL1 nothing happens. Is it due to the fact that it does not knows in wich line it has to add the [note] value.
Need I to give the select to identify the row ? It’s quite complicated for my level of knowledge.