I can see why you get the error.
RispSpecificINterventions is a table so you are not designating a Memo field.
it should be Dummy := memocopy (RiskSpecificInterventions myMemoOfSomeKindInThisTable,TdescTxtLabel,1) .
Im not sure what you are trying to do here but it can seem that even with the fix above nothing really happens.
RiskSpecificInterventions is the outer table so with the line above you modify the memo in this table.
But nowhere do you write it back to the table.
The modify records you use here will modify dummy in PhysOrder485 but not update RiskSpecETc.
MemoCopy is a manipulation function so it works on the underlying Multiview so the Memo so I think you get it almost right.
you dont need modify records where you use them.
To get this to work you need a memo object in the overall Multiview to store the memo value when you build it as you cant manipulate it directly in the lowest level as it doesnt exist there. In Modify records you need to allocate values.
define "retval" text .
define "switch" number .
for DummyTable ; -- This table is the out storage for memos, as we just need a memo in memory to manipulate and transfer back to our table in the end.
for MainData ; -- This is the table that will receive the completed Memo from DummyTable.
DummyTable DummyMemo := "" . -- Clearing the Memo so it is blank at the start .
switch := 1 . -- first add to memo without CR -- We use a toggle switch so the first line is added without CR and after that we append with CR.
For SomeData ; -- This is the table with the multiple records that need to be concatenated into the memo.
retval := MemoCopy(DummyTable DummyMemo,concat(Name, " "),switch) . here we build the new memo in the temporary Dummy Memo in dummy table.
switch := 4 . Set toggle switch to append with CR.
End end of work loop
modify records now we are ready to write to the memo
MyMemo := DummyTable DummyMemo .
End -- Maindata
End Dummy Loop
retval := RefreshScreen() . Refresh screen to see the result of manipulation.