No announcement yet.

How to assign value to a field in PHP code?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to assign value to a field in PHP code?

    Hi Friends,

    I have a problem assigning a value to a field.

    Normally, under an event such as On Load, I can assign a value to field like

    {Customer} = "John";

    and when run that field will show "John" when run.

    But when I have a Button on a form that invokes PHP codes. I put

    {Customer} = "John";

    in the php code section of that Button.

    Now when run, I press that button, the I expect {Customer} field to get value "John" but instead I got nothing.

    What did I do wrong?



  • #2
    The button will run some code and then show an ok button as buttons are meant to be used to create little processes. But there's a trick although it requires some work.

    in the customer field description set initial value to [glob_cust];
    in the button set the [glob_cust] to the value you need; then do a sc_redir to the same application.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /