Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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.
    Regards,

    Ishwor

    Comment


    • #3
      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 ?

      Comment


      • #4
        Originally posted by giovannino View Post
        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 ?
        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!
        Regards,

        Ishwor

        Comment


        • #5
          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

          Comment


          • #6
            _parent seems to do the job !!!

            Comment


            • #7
              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.

              Comment

              Working...
              X