The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Notification with count from table comp

SOLVED
Go to solution
Highlighted
Sascha Mohr_1
Esteemed Contributor

Notification with count from table comp

Hi,
we want to have the line count of a table component included in a notification, so we have [REQD.P.TODO] in the notification definition (TODO is the token of the TC). This works fine of course, as long as there is at list one line in the TC.
When it is empty the token does not produce "0" but an empty string. I added some JavaScript to the notification like
function todoTotals(){
if ("[REQD.P.TODO]" == "")
{ document.write("0");
}
else
{ document.write("[REQD.P.TODO]");
};
}
but this causes warnings on most e-mail clients. Does anybody have a more elegant solution?
Regards
Sascha
3 REPLIES
Solution

Re: Notification with count from table comp

Hi,

perhaps you can use a rule after fieldchange to write the counter to a new field.
NVL('[REQD.P.TODO]', '0') will give you the zero on empty table component.
But double check whether the token gives you the correct number after deleting a line.

Or do it the easy way, in notification add a zero in front of the token, so the user sees a '013' if there are 13 rows.

Regards
Michael
Sascha Mohr_1
Esteemed Contributor

Re: Notification with count from table comp

Hello Michael,
version one is easy enough.
You probably made some blckberry users happy. Thanks a lot!
Sascha Mohr_1
Esteemed Contributor

Re: Notification with count from table comp

.
//Add this to "OnDomLoad" event