Media Object Structures - Get Text

Bob B

Guest
I'm having trouble making the Media Object Structures function work for a get text action in an interactive form. Running E1 v9.0

The app puts an entry in F00165 just fine. I then want to retrieve the text into a TXVC variable, and subsequently write it to a different file. The code I use is as follows:

Media Object Structures(GT5687712, FC Media Object 13, <Exist>, VA frm_MOD_MediaStatus_VC02A, FI mnAddressNumber, FI mnEffectiveYear9)
If VA frm_MOD_MediaStatus_VC02A is equal to <Zero>
Call( App:p5687712 , Form:W5687712J )
FI cEverestEventPoint01 = ""
Else
FI cEverestEventPoint01 = "1"
Media Object Structures(GT5687712, <Default Media Object>, <Get Text>, <Default Text Object>, VA evt_MOD_TextString_TXVC, FI mnAddressNumber, FI mnEffectiveYear9)

The check for "Exist" returns a status value of 1, as it should, indicating the entry does exist in F00165. However, after executing the Get Text action, the variable that should receive the text value is always null.

What am I doing wrong?
 
Dont know off hand, but in one call you use "FC Media Object 13" and in the other call you use <Default Media Object>. Try switching that around and see if that helps.
 
I'm pretty sure you want to do SetText to have the text show on the Media Object control.
 
Can you elaborate - before the Get Text, or after? What does the parameter list need to look like?
 
Sorry Bob, I misread your original post. You are looking to get the text into a variable that you can use elsewhere, right? (Writing to another table?)
 
I think the problem may be with the variable you are using TXVC. Try using a smaller variable like DTA1. If your text is going to be large, you may want to use the C APIs to properly handle the text.

Craig
 
Craig, you were right. I changed the text variable to alias 98NOTES, which is a fixed-length string variable, ten thousand characters long. My code then worked exactly as I wanted.

My guess is that Get Text doesn't work properly with a variable-length string variable. Either that, or reducing my variable size to 10,000 satisfied some other type of limitation.

Thanks to everybody for their helpful suggestions.
 
Hi All,
I have a requirement to get Media obj text which is inside a table.
I am able to fetch the text from the Media object but unable to get it in the table format.
Can anyone please suggest a solution.


Thanks
Pallavi
 
Back
Top