Code: Select all
CREATE WebSection WITH WebSection.SecName='General Vehicle Images', WebSection.SecNum=1, WebSection.ob_WebWentry=WebEntry
CREATE WebPics WITH WebPics.PicSection='Front', WebPics.PicSeq=1, WebPics.ob_WebSection=WebSection
IMPORT DOCUMENT ThatWebPics.PicImage FROM 'c:\WebEntry\000\tta1.png'
CREATE WebPics WITH WebPics.PicSection='Rear', WebPics.PicSeq=2, WebPics.ob_WebSection=WebSection
IMPORT DOCUMENT ThatWebPics.PicImage FROM 'c:\WebEntry\000\tta2.png'
CREATE WebPics WITH WebPics.PicSection='Left', WebPics.PicSeq=3, WebPics.ob_WebSection=WebSection
IMPORT DOCUMENT ThatWebPics.PicImage FROM 'c:\WebEntry\000\tta3.png'
CREATE WebPics WITH WebPics.PicSection='Right', WebPics.PicSeq=4, WebPics.ob_WebSection=WebSection
IMPORT DOCUMENT ThatWebPics.PicImage FROM 'c:\WebEntry\000\tta4.png'
CREATE WebPics WITH WebPics.PicSection='Extra1', WebPics.PicSeq=5, WebPics.ob_WebSection=WebSection
IMPORT DOCUMENT ThatWebPics.PicImage FROM 'c:\WebEntry\000\tta5.png'
CREATE WebPics WITH WebPics.PicSection='Extra2', WebPics.PicSeq=6, WebPics.ob_WebSection=WebSection
IMPORT DOCUMENT ThatWebPics.PicImage FROM 'c:\WebEntry\000\tta6.png'
COMMIT TRANSACTION
Have to copy actual images into place for these 6 records... the user is supposed to upload the image.
But I have to assign "something" or it complains. I cannot leave the PATH ATTRIBUTE empty, so it is set in a rule.
PROBLEM IS this data gets created:
By the time I have created 6 records, all 6 are still in CONTEXT.
So when the final IMPORT happens, it imports that image to ALL 6 CONTEXT records.
I know WHY this is happening,
BUT I DONT KNOW how to do it like you would in any OTHER language.
Splitting it into different rules in the same process doesn't help.
DO I REALLY have to have a "master" process, and then 6 separate processes?