I would like to make the 'Enter' button on the ValidateUser have control whether or not to pass back Success or Failure ('Yes' or 'No' in PushAction terms)
On the form ValidateUser you could define a global blnAttempt and only set it to TRUE if the user enters the right credentials.
Create a function on form ValidateUser; GetAttempt with return value blnAttempt.
After ValidateUser.RUNMODAL you could call the function ValidateUser.GetAttempt.
On the form ValidateUser you could define a global blnAttempt and only set it to TRUE if the user enters the right credentials.
Create a function on form ValidateUser; GetAttempt with return value blnAttempt.
After ValidateUser.RUNMODAL you could call the function ValidateUser.GetAttempt.
By the way. It seems to me there should be a better solution than the one above.
And I think the best solution is with if Validate.RUNMODAL = ACTION::LookupOK then..
Unfortunatly I hadn't enough time when I made the solution descripted above.
When calling a form using RUNMODAL, ex: "Result := FormName.RUNMODAL;", is there anyway to dictate various responses returned to 'Result' through just 1 Button on 'FormName'?
I'm not asking how I would setup the IF statement when something does get returned back in Result or Attempt etc. Asking how to manipulate what gets returned from the form being executed through RUNMODAL. (Using just *one* button).
Answers
Tino Ruijs
Microsoft Dynamics NAV specialist
IF Attempt = ... THEN
ELSE
...
I would like to make the 'Enter' button on the ValidateUser have control whether or not to pass back Success or Failure ('Yes' or 'No' in PushAction terms)
So you're creating a functionality like in the following post:
http://www.mibuso.com/forum/viewtopic.php?t=13013
What should work: if Validate.RUNMODAL = ACTION::LookupOK then..
Tino Ruijs
Microsoft Dynamics NAV specialist
Attempt := ValidateUser.RUNMODAL;
Attempt will = True or False or Whatever. Depending on whether the user entered in the correct credentials.
How do I set a Button to dictate what kind of value to be passed back aside from what the button's PushAction might be assigned to?
Create a function on form ValidateUser; GetAttempt with return value blnAttempt.
After ValidateUser.RUNMODAL you could call the function ValidateUser.GetAttempt.
Tino Ruijs
Microsoft Dynamics NAV specialist
By the way. It seems to me there should be a better solution than the one above.
And I think the best solution is with if Validate.RUNMODAL = ACTION::LookupOK then..
Unfortunatly I hadn't enough time when I made the solution descripted above.
Tino Ruijs
Microsoft Dynamics NAV specialist
I'm not asking how I would setup the IF statement when something does get returned back in Result or Attempt etc. Asking how to manipulate what gets returned from the form being executed through RUNMODAL. (Using just *one* button).
(Thank you tinoruijs!)
You're welcome!
Good luck!
Perhaps it's not a lengthy process for you.
Tino Ruijs
Microsoft Dynamics NAV specialist