Page 1 of 1

Reading from other formats

Posted: Mon Oct 31, 2011 4:08 pm
by robhathome2
Hi all

I'm hoping it's me having a brain-freeze but is there any way to get the following:

write hdrfmt
exfmt mainfmt (with a grid)


now the user presses a bound image on the hdrfmt but I can see in the code that the only field moves from the pui ds's are for the mainfmt as that's the one that is read.

How can I detect the fact it was an image/icon in the hdrfmt that was clicked? I've debugged to confirm I'm seeing a blank in the pseudo indicator/bound variable.

Regards

Rob.

Re: Reading from other formats

Posted: Tue Nov 01, 2011 1:28 pm
by David
You'll just need to READ the HDRFMT record if you want to retrieve its input.

Try this:
RPG CODE
write hdrfmt
exfmt mainfmt
read hdrfmt
The READ on 'hdrfmt' will occur without it going back to the display (meaning immediately) since the record was already sent/received from the browser by the preceeding EXFMT operation.

It is, however, necessary to perform that opertion to copy the received information into the record buffer for 'hdrfmt'.

Re: Reading from other formats

Posted: Tue Nov 01, 2011 5:42 pm
by robhathome2
Thanks David

That's the problem with brain freezes - you never know you're having one.

Regards

Rob.