ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Toggling between fields in subfile when they overlap each other

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Toggling between fields in subfile when they overlap each other

    Hi,

    I have a subfile which has 24 columns and toggle button which let user toggle between those columns. I could probably make 2 subfiles and write to both at the same time and just toggle between them(I guess that this is possible).
    I've read that it is possible to overlay fields in the same subfile if sflsize = sflpage (so page at a time subfile)? I've read somewhere that you can't use DSPATR(ND) if fields overlap each other and have different length/type. You can only do this with one page at time subfile.

  • #2
    I don't know that you'd be limited to one page a time subfile - I would think that it would be all or nothing though. That is - if you do it on the first record you'd have to do the same for all records. I could be wrong as it's been awhile...

    Comment


    • #3
      Filip is almost right.
      If you want to let fields overlap conditionally in a subfile then you have to use sflsize = sflpage.
      And you can not use dspatr(nd). You have to condition the field it self like this:
      AAN01N02N03T.Name++++++RLen++
      A 31 FIELD_1 .........


      I have only done this once due to the fact that it was necessary to have input field with different lengths
      in the subfile lines.
      If you want to toggle between the columns then I would suggest that you use different subfiles.
      Then you can load the subfiles all at once in parallel.
      You don't have to use sflsize = sflpage.
      This enables you to receive line number at the top when toggling and position the top record to the corresponding
      record in the subfile that you toggle to.

      Kind regards
      Peder

      Comment

      Working...
      X