Page 1 of 1
Browse subform
Posted: Wed Nov 14, 2018 9:38 am
by stevedb
Hi,
Is it possible to have a subform that will just show the browse form?
I have a system where log entries are made and I want the form that launches the new log entry form to show the [read only] log history (along with some other stuff).
I can kind of do it with an edit subform with the objects set to readonly, but the browse form is nicer because it's paged and I can call-up related fields in the forms browse SQL.
Steve
Re: Browse subform
Posted: Thu Nov 15, 2018 10:37 am
by stevedb
Hi,
I did it with an iframe; removing the breadcrums etc from the top with:
I also disabled clicking with a do nothing nuSelectBrowse function:
... but ...
I'm struggling to find the onmouseover event for the record highlighting which I would like to disable.
Also, if I try to remove the 'Action Holder' in nuRemoveHolders (value '0') the browse form's page navigation buttons don't work correctly, they just blank the browse records and you can't navigate back to get them back. This has nothing to do with it being in an iframe - it does it if it is the main form as well. This is either a 'bug' or at least a condition I need to protect against - but I'm not entirely sure where/how I would do that.
Steve
Re: Browse subform
Posted: Thu Nov 15, 2018 8:41 pm
by kev1n
I have this code in a (iframe) form of mine to disable/modify some elements. The record navigation still works as it should (for me)
Code: Select all
if (nuFormType() == 'browse') {
// disable record highlighting
$("div[id^='nucell_']").unbind('mouseenter mouseleave');
$('.nuActionButton').hide();
$('#nuSearchField').hide();
$('#nuActionHolder').hide();
$('#nuBreadcrumbHolder').hide();
// $('body').css('height', '200px'); // modify the height if you need this
// $('#nubody').css({'background-color': '#F4F8F9' }); // modify the hex color if you need this
$("[id^='nusort']").attr('onclick','');
}
function nuSelectBrowse(e) {
// do nothing
}
Re: Browse subform
Posted: Thu Nov 15, 2018 9:52 pm
by admin
stevendb,
You can do want you are asking by using a
Run Object that uses the Browse Form you want to display and set the Method to
Iframe.
https://wiki.nubuilder.cloud/ ... #Tab_-_Run
Steven
Re: Browse subform
Posted: Fri Nov 16, 2018 9:01 am
by stevedb
Thanks kev1n, That's working perfectly!
For completeness ..
Seems that the browse form pagination problem is down to the removing of the nuActionHolder
Code: Select all
$('#nuActionHolder').remove(); // breaks pagination
$('#nuActionHolder').hide(); // works fine
As far as I can tell this is due to the pagination usage of nuSearchAction which uses elements in the nuActionHolder; which aren't there if you remove the nuActionHolder with nuRemoveHolders. Maybe there should be a nuHideHolders.
Steve
Re: Browse subform
Posted: Fri Nov 16, 2018 8:55 pm
by admin
.