• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Info Utility Widget?

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

  • Info Utility Widget?

    Before I code this up, I wanted to make sure it will work. The Info Widget lets you enter HTML markup and then place variables within it. I'm wondering if I create a string on the back that contains the markup already and return that as a variable to the front-end, if the info widget will display it as is where is sort of speak. I have a feeling it will but wanted to make sure.

  • #2
    Yes: If the info widget references an app variable, it will render the value of the app variable as HTML markup if it is valid markup

    Comment


    • #3
      It does render it, however, it doesn't look like what is expected. Chrome renders it as expected. It's as if the Info Widget is ignoring <br> and <p> tags. I've attached examples. Maybe I'm doing something wrong. xhtml-html.txt xhtml2.jpg xhtml1.jpg

      Comment


      • #4
        Here is a quick and dirty example with RPGLE:
        Code:
          SetResponse('appVar':'infoMarkup':
            '<div style="width:100%; height:100%; font-weight:600;">' +
                '<b>PO DESC:</b> Ring Power - ' +
                'Rent 400KW Generator Set for RF Chip Dryer Project (delivery 09/10/25)<br><br>' +
                '<b>PO CLASS:</b> CAPITAL' +
                '<h4>Parts</h4>' +
                '<ul>' +
                    '<li>-</li>' +
                '</ul>' +
                '<h4>Services</h4>' +
                '<ul>' +
                    '<li>623606-2025 - Bristol RF Chip Dryer Project</li>' +
                    '<li>623606-2025 - Bristol RF Chip Dryer Project</li>' +
                    '<li>623606-2025 - Bristol RF Chip Dryer Project</li>' +
                    '<li>-2025 - Bristol RF Chip Dryer Project</li>' +
                '</ul>' +
            '</div>');
        Screenshot 2025-11-06 at 9.30.46?PM.png

        Another example:
        Code:
          SetResponse('appVar':'infoMarkup':
            '<div style="width:100%; height:100%; padding:16px; background:#fafafa;">' +
                '<div style="background:white; padding:16px; border-radius:4px; ' +
                    'margin-bottom:12px; border-left:4px solid #1976d2;">' +
                    '<div style="margin-bottom:8px;">' +
                        '<b style="color:#1976d2; display:inline-block; min-width:80px;">' +
                        'PO DESC:</b>' +
                        '<span style="color:#333;">Ring Power - Rent 400KW Generator Set for ' +
                                'RF Chip Dryer Project (delivery 09/10/25)</span>' +
                    '</div>' +
                    '<div>' +
                        '<b style="color:#1976d2; display:inline-block; min-width:80px;">PO CLASS:</b>' +
                        '<span style="color:#333;">CAPITAL</span>' +
                    '</div>' +
                '</div>' +
                '<div style="background:white; padding:16px; border-radius:4px; ' +
                      'border-left:4px solid #1976d2;">' +
                    '<h4 style="color:#1976d2; margin:0 0 12px 0; font-size:15px;">Parts</h4>' +
                    '<ul style="margin:0; padding-left:20px;">' +
                        '<li style="color:#999;">-</li>' +
                    '</ul>' +
                    '<h4 style="color:#1976d2; margin:16px 0 12px 0; font-size:15px;">Services</h4>' +
                    '<ul style="margin:0; padding-left:20px;">' +
                      '<li style="margin-bottom:4px;">623606-2025 - Bristol RF Chip Dryer Project</li>' +
                      '<li style="margin-bottom:4px;">623606-2025 - Bristol RF Chip Dryer Project</li>' +
                      '<li style="margin-bottom:4px;">623606-2025 - Bristol RF Chip Dryer Project</li>' +
                      '<li>-2025 - Bristol RF Chip Dryer Project</li>' +
                    '</ul>' +
                '</div>' +
            '</div>');
        Screenshot 2025-11-06 at 9.44.32?PM.png

        Comment


        • #5
          Sweet! Thanks! I'll give it a try

          Comment

          Working...
          X