This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
jyoung
Posts: 694 Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA
Post
by jyoung » Wed Sep 27, 2017 2:52 am
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.
Thanks,
Joe
MarkDale
Posts: 116 Joined: Wed Dec 02, 2015 10:06 am
Post
by MarkDale » Wed Sep 27, 2017 6:21 am
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
jyoung
Posts: 694 Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA
Post
by jyoung » Wed Sep 27, 2017 11:34 pm
Ugh. I knew I was having a melt down. lol.
Thanks!