I’m working with SC7 v.7.00.0017
I have build a control form with several text fields, for example {IdPortal}.
Then, I have added a PHP button, named “B3”, with code uses sc_lookup macro to find a value in a table field, which is assigned to the variable {IdPortal}.
I have checked that the value is found and assigned to the the field variable {IdPortal} writing an echo command to show it.
In run time, when I click this custom “B3” button, the screen shows a new screen with an “OK” button (?is normal?)
Then, when I click this “OK” button, SC returns to the original control screen from which the execution began, but doesn’t change the value in the {IdPortal} field, despite the code has explicit changed it.
Is a bug ?
If I write just the same code in the OnValidate event, the desired behavior is accomplished when I click in the OK button of the control form: the {IdPortal} form field shows the new value, and no other screen is shown.
Why the behavior is different ?
Best Regards,