PushAction Altercation Possible?

XypherXypher Member Posts: 297
I am using a custom User/Pass form to request user validation (apart from Database/Windows Auth).

Currently I am calling the form using RUNMODAL and am curious if I can pass back an PushAction other than what I assign a button?

Answers

  • tinoruijstinoruijs Member Posts: 1,226
    What kind of PushAction do you want to have?

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • XypherXypher Member Posts: 297
    Attempt := ValidateUser.RUNMODAL;

    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)
  • tinoruijstinoruijs Member Posts: 1,226
    Ok.
    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
  • XypherXypher Member Posts: 297
    Creating the functionality yes. But still not showing how to pass back a certain value, whether it be a PushAction or not.

    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?
  • tinoruijstinoruijs Member Posts: 1,226
    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.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • tinoruijstinoruijs Member Posts: 1,226
    tinoruijs wrote:
    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. :(

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • XypherXypher Member Posts: 297
    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).
  • XypherXypher Member Posts: 297
    If anyone was curious to know the solution, I'm just going through the lengthy process that was recommended by tinoruijs.

    (Thank you tinoruijs!)
  • tinoruijstinoruijs Member Posts: 1,226
    Xypher wrote:
    If anyone was curious to know the solution, I'm just going through the lengthy process that was recommended by tinoruijs.

    (Thank you tinoruijs!)

    You're welcome!

    Good luck!
    Perhaps it's not a lengthy process for you. :wink:

    Tino Ruijs
    Microsoft Dynamics NAV specialist
Sign In or Register to comment.