Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
neidingd Honored Contributor.
Honored Contributor.
1335 views

CGI: multi checkbox set - with "is identified by"

Hello,

if i use a HTML-Form with a "multi checkbox set" i have the same issue like in php:
http://www.wastedpotential.com/html-multi-checkbox-set-the-correct-way-to-group-checkboxes/

When i use the brackets like in the description i get no date when i use "identified by"

Sample of my HTML-Part:

   <fieldset>
      <table>
         <tr><td><label for="fGrund"><strong>Anlagegrund: *</strong></label></td>
             <td><input type="checkbox" class="checkbox" id="fPote" name="Grund[]" value="P"  /> <i>(Lieferant mit gro&szlig;em Potential)</i><br />
                 <input type="checkbox" class="checkbox" id="fAuEr" name="Grund[]" value="E"  onClick="toggle('fAuEr', 'fAuErVol')" /><i> (Auftrag in Erwartung)</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                 <strong> ca. Volumen: </strong> <input id="fAuErVol" name="AuErVol" value="" size="9" maxlength="9"  disabled class="required" /><br />
                 <input type="checkbox" class="checkbox" id="fAuVo" name="Grund[]" value="V"  onClick="toggle('fAuVo', 'fAuVoVol')" /><i> (Auftrag vorliegend)</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong> ca. Volumen: </strong> <input id="fAuVoVol" name="AuVoVol" value="" size="9" maxlength="9"  disabled class="required" /><td></tr>
      </table>
   </fieldset>
   <fieldset>

Sample of the Cobol-Part:

       01  io-form           is external-form
                                identified by "v4/LiForm".
           03  f-mod         pic x(20)   is identified by "mod".
           03  f-tstamp      pic x(16)   is identified by "tstamp".
           03  f-sgid        pic x(8)    is identified by "sgid".

           03  f-Grund       pic x(10)   is identified by "Grund".
           03  f-AuErVol     pic 9(9)    is identified by "AuErVol".
           03  f-AuVoVol     pic 9(9)    is identified by "AuVoVol".

give it a chance to receive the checkbox-array with "is identified by".

Or is my only chance to use the "C$GETCGI" Routine?
When i use this Routine, are the brackets needed?

David

0 Likes
2 Replies
neidingd Honored Contributor.
Honored Contributor.

RE: CGI: multi checkbox set - with "is identified by"

i decided to use "C$GETCGI" for the array-values and it works... but i have a new strange problem.

I have to arrays and one works and one not.

          call "C$GETCGI" using  "Grund", a-Grund(1), 1

                          giving cgi-size.

          call "C$GETCGI" using  "Grund", a-Grund(2), 2

                          giving cgi-size.

          call "C$GETCGI" using  "Grund", a-Grund(3), 3

                          giving cgi-size.

          call "C$GETCGI" using  "Bereich", a-Bereich(1), 1

                          giving cgi-size.

          call "C$GETCGI" using  "Bereich", a-Bereich(2), 2

                          giving cgi-size.

          call "C$GETCGI" using  "Bereich", a-Bereich(3), 3

                          giving cgi-size.

          call "C$GETCGI" using  "Bereich", a-Bereich(4), 4

                          giving cgi-size.

          perform varying idx from 1 by 1 until idx > 3

             move idx to line-text

             display     line-form

             move "<br />" to line-text

             display     line-form

             move a-Grund(idx) to line-text

             display              line-form

             move "<br />" to line-text

             display     line-form

             if a-Grund(idx) = "P"

                move "P found<br />" to line-text

                display                 line-form

                move 1 to dbf-Pote end-if

             if a-Grund(idx) = "E"

                move "E found<br />" to line-text

                display                 line-form

                move 1 to dbf-AuEr end-if

             if a-Grund(idx) = "V"

                move "V found<br />" to line-text

                display                 line-form

                move 1 to dbf-AuVo end-if

          end-perform.

          perform varying idx from 1 by 1 until idx > 4

             if a-Bereich(idx) = "W" move 1 to dbf-Wasser end-if

             if a-Bereich(idx) = "K" move 1 to dbf-Kanal  end-if

             if a-Bereich(idx) = "O" move 1 to dbf-Oberfl end-if

             if a-Bereich(idx) = "B" move 1 to dbf-Beton  end-if

          end-perform.

i do in both arrays the same to fill the needed variables. But in the RED-Part the variables don't fill the found variable with "1".

So i decided to add some displays to the output to see what happs.

  • The array is filled (display before the if)
  • "P", "E" and "V" are found (display in if)
  • but the "1" isn't moved to the target value

wired....

0 Likes
neidingd Honored Contributor.
Honored Contributor.

RE: CGI: multi checkbox set - with "is identified by"

ok, i found the error. It was my fault!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.