Copy Text Media Object

guenthardj

Member
How do you copy a text media object from one media object data structure to a different media object data structure? I have two media object data structures, GT551501A and GT551538B. The key field is different for each data structure. On a fix/inspect form, I want to copy the text media object attached to a given key field for GT551501A to GT551538B. I want to do this during the "Add Record to DB - Before" event.

I see that you can use the <Change Key> action to copy a media object to a different form. But, in that case, you're using the same data structure. I just want to copy the text from one media object to another with a different data structure.

Any help would be much appreciated.

Thanks.
 
I think I finally figured this one out on my own :) I had to place a media object control on my form and then use the <Edit> Media Object Structures function using the data structure to copy from. I then used the <Change Key> and <Save> Media Object Structures function using the data structure I wanted to copy to and the same media object control.
 
Jay,

Thank's to keep us inform.

I didn't know about the "Change Key" functionality. One More question about it : When I look at your explanation it seems that the user have to edit(display) the processing option before the copy phase, is it true ?

Another thing : is it just "Edit" "Change Key" and "Save" one after the other ? since I never used the change key, can you provide us with a code example ?

Thank you

Christian Audet

*** SHARED KNOWLEDGE = BETTER KNOWLEDGE ***

Implementing B7333 (Xe) SP16.1, SQL
(Support B732, B7331 and B7332)
 
Christian,
I don't have a code example, yet, hopefully by the end of the day, but I did find doc ID ott-01-0067, How to use Media Object System Functions, on the Knowledge Garden.
It says:
"<Change Key>: Used when copying a form that contains a media object into a new form. The application developer can <edit> or <display> the old media object, use <change key> and then, <save>."


Tim Rathjen
B7332 SP16 Oracle 8.1.6 Intel/NT OptioDCS 6.3.6
 
Back
Top