I have a database where I need to copy text from one memo field and append it to another memo in a different window. I tried to do it in two ways:
(1)
I tried doing it with action scripting (copy text to memo field) but it gives the following error:
script:OnPush line:105 readonly_flag = TempObj.field.readonly
Property is write only
TempObj.field subelement not found.
I guess it's trying to tell me either that the field is write only (which it is not!) or that it does not exist (but it does!).
so I tried it this way:
(2)
also with action scripting, I copy the content of the first memo field into a global character variable, copy the content of the destination memo into another global character variable, then assign the value of the two variables back to the destination memo field.
This works most of the time, but not consistently.
Occasionally, all the text in the destination memo is deleted and replaced by either this set of characters: ˆ™P_ or by some other weird characters. Worse, sometimes the whole record in the destination window is deleted, and it is not available to undelete by right-clicking on the table in the Control Panel.
Both fields are regular text memo.
The origin memo is in a window based on a single table where the memo is a field in the table.
The destination memo is in a window based on a set; the mother table is a customer table, the memo is in a separate table linked one to one to the customer table. Making the memo a field of the customer table makes no difference - I get the same errors.
This is the code that assigns the text back to the destination memo:
time("x Mon yy 0h:0m am")+" - "+user_name()+" called "+var->vContactName+crlf()+Var->vCallNotes+crlf(2)+Var->vCustHistory
Any of you tried to copy text from one memo to another across windows? How can I do it and get consistent results? I was thinking of using xbasic for the copy operation, but my guess is that the problem is caused by the variables somehow losing their content, or by some bug in assigning the text back to the destination memo.
Any help would be greatly appreciated.
(1)
I tried doing it with action scripting (copy text to memo field) but it gives the following error:
script:OnPush line:105 readonly_flag = TempObj.field.readonly
Property is write only
TempObj.field subelement not found.
I guess it's trying to tell me either that the field is write only (which it is not!) or that it does not exist (but it does!).
so I tried it this way:
(2)
also with action scripting, I copy the content of the first memo field into a global character variable, copy the content of the destination memo into another global character variable, then assign the value of the two variables back to the destination memo field.
This works most of the time, but not consistently.
Occasionally, all the text in the destination memo is deleted and replaced by either this set of characters: ˆ™P_ or by some other weird characters. Worse, sometimes the whole record in the destination window is deleted, and it is not available to undelete by right-clicking on the table in the Control Panel.
Both fields are regular text memo.
The origin memo is in a window based on a single table where the memo is a field in the table.
The destination memo is in a window based on a set; the mother table is a customer table, the memo is in a separate table linked one to one to the customer table. Making the memo a field of the customer table makes no difference - I get the same errors.
This is the code that assigns the text back to the destination memo:
time("x Mon yy 0h:0m am")+" - "+user_name()+" called "+var->vContactName+crlf()+Var->vCallNotes+crlf(2)+Var->vCustHistory
Any of you tried to copy text from one memo to another across windows? How can I do it and get consistent results? I was thinking of using xbasic for the copy operation, but my guess is that the problem is caused by the variables somehow losing their content, or by some bug in assigning the text back to the destination memo.
Any help would be greatly appreciated.
Comment