Skip to main content
Nintex Community Menu Bar
Question

Update page include from table row action?

  • July 9, 2024
  • 6 replies
  • 6 views

Forum|alt.badge.img+18

Is there a way to update a page include from a table row action?

I really want to use a table, not a queue.

This topic has been closed for replies.

6 replies

Forum|alt.badge.img+17
  • Nintex Employee
  • 3766 replies
  • July 9, 2024

There are no declarative mechanisms to pass the query string into a page include and refresh the include.  What we would reccomend would be to put your detail content on the same page with your table.  The models for your detail should not load any data on page load, and should have filterable conditions to narrow down to the same single record from your table row.  

Then in your table row - the row action should activate the conditions in the detail models and requery those models.  This will show the detail associated with the row in the table. 

Hope this works… 


Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 9, 2024

Thanks, Rob. I’ve done what you were describing before… I was just hoping not to have to recreate the detail pages.

Off to copy and paste some XML! 🙂


Forum|alt.badge.img+7
  • 95 replies
  • July 9, 2024

It sounds like you’re attempting something similar to the Case Management page on the repo.
https://github.com/skuidify/SamplePages/blob/master/pages/Case%20Management%20Page
I’m about to try a similar concept and I’ll see if I can’t update the javascript that does the “View Case” work.




var detailModel = skuid.model.getModel(‘CaseDetail’); var detailCommentsModel = skuid.model.getModel(‘CaseDetailComments’); var detailTasksModel = skuid.model.getModel(‘CaseDetailTasks’); var detailCondition = detailModel.getConditionByName(‘CaseId’); var detailCommentsCondition = detailCommentsModel.getConditionByName(‘CaseId’); var detailTasksCondition = detailTasksModel.getConditionByName(‘CaseId’); detailModel.setCondition(detailCondition,args.item.row.Id,true); detailCommentsModel.setCondition(detailCommentsCondition,args.item.row.Id,true); detailTasksModel.setCondition(detailTasksCondition,args.item.row.Id,true); skuid.model.updateData([detailModel,detailCommentsModel,detailTasksModel]);


Forum|alt.badge.img+17
  • Nintex Employee
  • 3766 replies
  • July 9, 2024

That case management page was built before we had the action framework. The javascript in that page is now really not necessary when you chain together a number of actions. 


Forum|alt.badge.img+9

For the record I managed to get at some Javascript methods that can be used for this. I have a page include that I need to update with different pages and query strings depending on what search result is clicked on. “include” is the unique id of the page include.

var params = arguments[0], $ = skuid.$;<br>var row = params.row; //get the page include JS object<br>var pageInclude = $('#include').data('object');<br>var pageName, queryStr;<br>switch(row.attributes.type){<br>&nbsp; &nbsp; case "Utility_Account__c":<br>&nbsp; &nbsp; &nbsp; &nbsp; pageName = 'UtilityAccountDetail_Widgets';<br>&nbsp; &nbsp; &nbsp; &nbsp; queryStr = 'id=' + row.Id;<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; case "Account":<br>&nbsp; &nbsp; &nbsp; &nbsp; pageName = 'AccountFinanceTeam';<br>&nbsp; &nbsp; &nbsp; &nbsp; queryStr = 'id=' + row.Id;<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; case "Lead":<br>&nbsp; &nbsp; &nbsp; &nbsp; pageName = 'LeadDetail';<br>&nbsp; &nbsp; &nbsp; &nbsp; queryStr = 'id=' + row.Id;<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; case "Contact":<br>&nbsp; &nbsp; &nbsp; &nbsp; pageName = 'UtilityAccountDetail_Widgets';<br>&nbsp; &nbsp; &nbsp; &nbsp; queryStr = 'id=' + row.Id;<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br>} //set the page to load<br>pageInclude.pagename = pageName; //set the querystring params<br>pageInclude.querystring = queryStr; //load the page<br>pageInclude.load();


 


Forum|alt.badge.img+10

That’s pretty cool, Moshe. I’ve spent the Christmas break playing around with single page app concepts and page includes in Skuid and this might come in rather handy. Thanks for sharing.