Calculate the cost of group

Dear Everybody,

I have a problem need your help.

I set the User ID under the Group for the cost of group
for example:

  • Administrator group characters A_ *

  • Financial group of characters F_ *

I use the function SETFILTER :

IF “G/L Entry”.“User ID” <> ‘’ THEN
BEGIN
SETFILTER(“User ID”,‘A_ *’);
Amount_Administrator:=“G/L Entry”.Amount;
END;
IF “G/L Entry”.“User ID” <> ‘’ THEN
BEGIN
SETFILTER(“User ID”,‘F_ *’);
Amount_Financial:=“G/L Entry”.Amount;
END;

But still no separation costs group.
Please thank the support.

Kind regards

Looking at your code, you’re overwriting the A_* filter with the F_* filter. You probably want to be looking at the first character of the USERID value (as opposed to the value in GenLedgEntry.“User ID” to determine which filter to apply.

Use Clear to clear the filters on the GL Entry Variable before checking the User Id of A or F.

Thanks George.

Thanks Manish. But I can’t use function Clear. Because beforce checking it will 0.