on 02-19-2022 6:15 PM
Hi,
I am using string target for Object Table like below. In the rule, I am returning the array. But data is not displayed on the page. And when I do click on search and start typing it I can see the data on the page. I want data to be loaded without the interaction of search. Any Solution? ---- Thanks in advance !!
"Target": "/Project/Rules/OnLoadData.js"
Can you share your rule?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi bill.froelich,
I tried returning the hardcoded array like below. It's working.
export default function OnLoadData(clientAPI) {
return [{
"Description": "Test Lead 11",
"Notes": "Lead Generation from Marketing Planning",
"StartDate": "25/12/2014",
"EndDate": "24/12/2016",
"UserStatusText": "lost"
}, {
"Description": "Test Lead 21",
"Notes": "Lead Generation from Campaign Planning",
"StartDate": "25/12/2014",
"EndDate": "24/12/2016",
"UserStatusText": "won"
}];
}
export default function OnLoadData(clientAPI) {
var sCurrentPage = clientAPI.getPageProxy().currentPage;
var oBinding = sCurrentPage.previousPage.context.binding;
return oBinding.leadsList;
}
I don't believe that you can reference the source from the previous page that way in the mobile client. I tried a number of combinations but was unable to access the binding from the previous page. My suggestion would be to store the binding in ClientData on the previous page so that it can be easily accessed from the next page.
Did you test your rule in the VS Code debugger to confirm your oBinding.leadsList contains data?
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.