Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 14 JUN 2006 08:38:52PM Joe Wesner wrote:

It has been a while since I worked with popups. I am having a brain freeze. I am trying to attempt to display a popup that the data is text with multi lines. When the user hits F2 the popup should display a list of hazard codes from the hazard file. What I want to come back is the contents of the hazard description. The hazard description field is setup as a text with multi lines. When I display the popups it only shows the one line and only brings that one line back in the field. I am not sure if this can be done without extensive programing or am I just missing something. Anyhelp would be appreciated. Thanks in advance.

Joe


At 14 JUN 2006 10:01PM Warren Auyong wrote:

If you want something like:

col1- col2———–

code1 text1 for code1

blank text2 for code1

blank text3 for code1

code2 text1 for code2

blank text2 for code2

code3 text1 for code3

blank text2 for code3

It's going to take some programming. Essentially you'd write a report program to fill the column and lines to slam into the popup. You'd either build the popup on the fly or build a suitable record to feed to a saved popup. Might involve the system subroutine popup_soft or whatever it is called.


At 15 JUN 2006 12:07AM Joe Wesner wrote:

basically all I want is get the data that is in that record which is a text field. The text field is two lines. I would like to show the two line in the popup. The popup should allow for two lines to be displayed for each record of the hazard file. One the user choses the correct hazard then the text in the hazard record comes into the field that the popup called. I hope I am explaining this correctly. Thanks you.

Joe.


At 15 JUN 2006 01:35AM Warren Auyong wrote:

Does the user have to see the full two lines of text as two lines in the popup? This can be done but will take some coding. The easiest thing to do would to show as much of the two lines of text that can fit on one line in the popup but when the popup returns data the data will contain an @VM or @TM to split the lines into the entry field.


At 15 JUN 2006 09:34AM Gerald Lovel wrote:

Make the popup 3-column. Put the code in col1, description line1 in col2, description line2 in col3. Return col2 and col3.

If you are a WORKS member, you may wish to investigate the POPOUT utility on the ATLAS demo from the WORKS disk, as it does this without coding and has a multi-text return option. (You even get to eliminate the HAZARD table.) If you are not a WORKS member, email me for instructions on where to download ATLAS.

glovel@atlaswares.com


At 15 JUN 2006 01:11PM Warren Auyong wrote:

Warning! You risk hitting the 64K limit or running out of string space but you can do this (depending on how large the Hazards file is.)

Assumption: HAZARD file

recordkey=Hazard Code (hc or hcid)

Text line 1

Text line 2

Create a popup (in this example TEST)

(use defaults unless otherwise indicated, you position, col widths, justification and headings as you see fit)

Mode=R

Title=Hazards

Column Formats (two columns):

-Pos=1 Width=5 Just=C Conv=' Col Heading=HC

-Pos=2 Width=40 Just=L Conv=' Col Heading=Description"

Type of Information returned=P

Then create a program like so, compile and catalog and call it from the F2 for the prompt in your Window. The text will be returned in @ANS the lines delimited by @TM:

Subrouting FillHC
declare function pop_up_soft
@ans='
p1='
p2='
p3='
p4='
call push.select(p1,p2,p3,p4)
PERFORM "SELECT HAZARD BY HC (S"
if @reccount and @list.active then
   rec='
   keys='
   done=0
   loop
      readnext hcid else done=1
   until done
      hcrec=xlate('HAZARD',HCID,'','X')
      for k=1 to 2
         text=hcrec
         if k=1 then temp=hcid else temp='
         rec := temp : @VM : text : @FM
         keys := hcid : @fm
      next k
   repeat
   keys-1,1='
   rec-1,1='

   pos=pop_up_soft("POPUPS*TEST",STATUS,'','','',rec,'','','','','','','','')

   if Len(pos) then
      hcid=keys
      hcrec=xlate('HAZARD',hcid,'','X')
      @ans=hcrec : @TM : hcrec
   end
end
call push.select(p1,p2,p3,p4)
return

At 15 JUN 2006 01:12PM Warren Auyong wrote:

whoops! That should be a pop.select before the return statement, not push.select.


At 21 JUN 2006 11:40PM Joe Wesner wrote:

Thank you Warren for all your help I will code it tomorrow and let you know how it works out. Thanks again.


At 23 JUN 2006 12:09AM Joe Wesner wrote:

Thank you Warren. It worked like a charm. I really appreciate all the help. Thanks again.

Joe.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/931689552f2de9108525718e00038ef2.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1