Rod Anderson
Member
I feel like I'm being really stupid here. I co-working brought me a problem similar to this code snippet:
The issue is while "Groupings" will fill in full it can't perform save-row-changes() since the unique constraints are not fully defined. Should I perform some kind of after row fill to maintain the rowid? Any insight into solving my ignorance would be appreciated.
Thanks advance,
Rod
Code:
def temp-table masterGroup
field groupid as char
field groupdesc as char
INDEX idxid is primary unique groupid.
DEF temp-table masterDetail
field groupid as char
field component as char
INDEX idxid is primary unique groupid component.
DEF temp-table Groupings
field groupingcd as char
field groupid as char
field component as char
INDEX idxid is primary unique groupingcd groupid component.
DEFINE DATASET MyDS FOR masterGroup,masterDetail,Groupings
DATA-RELATION DataRelationMaster FOR masterGroup,masterDetail
RELATION-FIELDS (groupID,groupID)
DATA-RELATION DataRelationGroupings FOR masterDetail,Groupings
RELATION-FIELDS (groupID,groupID,component,component).
The issue is while "Groupings" will fill in full it can't perform save-row-changes() since the unique constraints are not fully defined. Should I perform some kind of after row fill to maintain the rowid? Any insight into solving my ignorance would be appreciated.
Thanks advance,
Rod