Page 1 of 1

highlight records

Posted: Wed Feb 28, 2018 10:26 am
by Audioko
Hi,

In version pro3 I could highlight records with the use of nuLoadBrowse function.
E.g. to distinct records of a product browse form that are no longer in stock.
How can I do this in Forte?

thanks,
Ko

Can I roughly use the same code and replace specific elements like 'row' with 'nucell' etc?

Re: highlight records

Posted: Wed Feb 28, 2018 12:01 pm
by admin
audioko,

There is no nuLoadBrowse() or nuLoadEdit().

All the Javascript on a Form gets run each time a Form loads.

This should help...

https://forums.nubuilder.cloud/viewtopic. ... ype#p16144


Steven

Re: highlight records

Posted: Wed Feb 28, 2018 12:03 pm
by toms
Ko,

This works for me:

Code: Select all

if (nuFormType() == 'browse') {
    $('[data-nu-column="4"]').each(function (index) {

        var cellId = $(this).attr('id');
        var cellValue = $('#' + cellId).html();
        var rowNum = String(cellId).split('_')[1];

        if (cellValue == '0') {
            $("div[id^='nucell_" + rowNum).css("color", "red");
        }
    });
}

Re: highlight records

Posted: Wed Feb 28, 2018 1:31 pm
by Audioko
Hi Steven, Tom,

Thanks a lot both of you.
It works for me now too.

I need to learn better Javascript / JQuery and sure I will....

Ko

Re: highlight records

Posted: Wed Feb 28, 2018 6:09 pm
by admin
.