on 11-20-2019 7:59 AM
Hi,
I want to get the context object from selectionproxy in offline mode, can you please tell me the way to get it?
Thanks & Regards,
For Table controls where you are creating a rule in the OnPress event the selected object can be obtained with the following call in your rule.
let selected = context.getPageProxy().getActionBinding();
This is applicable for all MDK applications both online and offline.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All rules are passed the current context as the input parameter to the rule. You can name the input parameter anything you want or just generically call it context.
export default function myRuleName(myRuleContext) {
The proxy type for that context will depend on where that rule is being executed from. For example, a rule running from the Action Bar would have a Page Proxy context while a rule executing in the OnValueChange of a control will have a different context.
In some cases you may to access the proxy for a different control. To get that proxy you can context.evaluateTargetPathForAPI(path) and pass in the target path. The path could be #Control:MyControlName or #Page:Main/#Control:MyOtherControl and the function returns the proxy object.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.