Auto refresh sublist columns
AnsweredGood day,
I have following case:
3 lists:
- main list with the newform.
- sublist inside that newform for calculations and multiple items
- data list on which the sublist is lookup
When I open the newform from main list, i go to sublist and want to entry some data. Sometimes I need to use lookup value which does not exist in the data list. I have created a button which opens a modal of newform of data list, so I open the new value for lookup.
Is it now possible with a action to refresh the sublist columns without reloading the page?
Sorry if it's not clear, I can make some screens as well.
Thanks in advance
-
Hello Senad Omicevic
You can add Execute Script Action next to the Action that Open modal dialog of NewForm of data list and try use next code in it:
var allSubLists = window.Ardevia.SubListsProvider.GetAllSubLists();
var viewId = "{5FB4CDEA-0139-491A-8716-86ADE403649D}";
var sublistToRefresh = allSubLists.SBfirst(
function(item) {
return item.GetGridInitInfo().jsInitObj.viewId.toUpperCase() == viewId;});
if(sublistToRefresh){
sublistToRefresh.Render();
}Replace the 'viewId' variable value with your specific value. To get the view ID for the sub list it is probably easiest to select "Edit Web part" from the sub list web part's context menu, then "Edit current view" in the web part properties and then inspect the opened iFrame where you'll find the View= in the URL query string
Hope it can help.
Best Regards
Vladyslav Noskov
0 -
0
Please sign in to leave a comment.
Comments
2 comments