Page 1 of 1

Initialize group_by

Posted: Wed Sep 27, 2017 2:52 am
by jyoung
How do you initialize a group of fields using group_by?

This gives a "Assignment operator is not valid when used with field list identifier #MyFields" error.

Code: Select all

group_by name(#MyFields) fields(#wk_TotalOpen #wk_CurrentOpen #wk_TotalGross #wk_Open30 #wk_Open60 #wk_Open90 #wk_Open120 #wk_OpenOver120)

mthroutine name(#MyMethod)
#MyFields := 0
endroutine
All of the fields are a Packed(15,2) and I am trying to get them all to zero.

I can set them all individually, I just thought this was something I could do. Perhaps I am just having a brain melt-down. :D

Thanks,
Joe

Re: Initialize group_by

Posted: Wed Sep 27, 2017 6:21 am
by MarkDale
This works for me

#MyFields := *NULL

(or #MyFields := *default)

It has to be a special value because a group of fields may contain different types of fields

Re: Initialize group_by

Posted: Wed Sep 27, 2017 11:34 pm
by jyoung
Ugh. I knew I was having a melt down. lol.

Thanks!