GenerateRandomNumber How TO - InfoPath Dev
in

InfoPath Dev

GenerateRandomNumber How TO

Last post 09-14-2011 05:20 AM by ErnestoM. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-12-2011 11:15 PM

    GenerateRandomNumber How TO

    Hi There,

    I have a very simple task, I need to use qrules to generate a random number, so I can use this within the form, at the moment I am trying to create a new rule on form load, that sets the command to GenerateRandomNumber and then ruse the results box to output the number. however this does not seem to work. can someone explain how to generate a random number using the qrules 3.3 that I can use in various fields..

    or at least let me know what I am doing wrong !

     thank you.

     

  • 09-13-2011 12:20 AM In reply to

    Re: GenerateRandomNumber How TO

    Hello,

    It should work the way you're describing it, and I just tried this for myself and it worked just fine.

     Could you describe exactly how you're trying to do this, exactly what rules you are using and in what order?  A screenshot of the rule actions could also be good.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-14-2011 05:20 AM In reply to

    Re: GenerateRandomNumber How TO

    I apologize for the lack of documentation on this command; we try to document everything but focus on the more complex scenarios. Unfortunately, that means neglecting to document commands like GenerateRandomNumber. We hope that the qRules User Guide has enough info on its use. The qRules documentation is located here.

    I would suggest:

    • Display the Result, Error and Success nodes in your form
    • Set a rule on a button click to set Command = GenerateRandomNumber
    • Verify that the number is generated.

    If it fails so far, please contact us, since it will be a failure in the product.

    If it works so far, then it's just a matter of moving the rules around and playing with your InfoPath form's design.

    • Set a rule in the finishedLoading node, such that it executes only when finishedLoading=TRUE. (Or create an onLoad rule)
    • That rule will then have the action to set Command =GenerateRandomNumber
    • Then finally a rule to set the main data source's field value to the Result node.
    Hope this helps.
    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.