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.