Overlaying window on screen

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
nihate
New User
Posts: 3
Joined: Sat Nov 27, 2021 1:46 am
First Name: Nihat
Last Name: Ezer
Company Name: anadolusigorta
Contact:

Overlaying window on screen

Post by nihate »

Greetings,

Downloaded the open source version of the profound ui js framework and managed to get its samples worked done.

My question is about the second sample, customer inquiry. When customer number in not found on the table, i just wanted to give user a message within a window, but failed to do it as the first screen is cleaned.

Gave it a try with overlay and/or assume keyword within the second format, but no luck



Cheers,
Nihat
Attachments
2.png
2.png (4.59 KiB) Viewed 4168 times
1.png
1.png (5.33 KiB) Viewed 4168 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Overlaying window on screen

Post by Scott Klement »

This is what I would recommend for that example:

In the display file:
  1. Open CUSTINQ1D in the Visual Designer.
  2. Click the text box (input field) where the user will type the customer number.
  3. In the properties list on the right, find "error messages". Select it, and click the "..." button.
  4. click "Add" to add a new message.
  5. Click the blue/white binding button next to "message text", and set it to a field named ERRMSG, type=Character, length=100. Click "OK" to exit the binding dialog.
  6. Click the blue/white binding button next to "error condition" and set it to a field named SHOWERROR type=Indicator. Click "OK" to exit the binding dialog.
  7. click ok to exit the error messages property.
  8. save and compile the updated display file.
In the RPG program:
  • Open CUSTINQ1R source member in RDi or similar.
  • Find the following code:

    Code: Select all

               If Not %Found();
                 CSNAME = '';
               EndIf;
    
    Change it to:

    Code: Select all

               ShowError = *Off;
               If Not %Found();
                 CSNAME = '';
                 ErrMsg = 'Customer not found';
                 ShowError = *on;
               EndIf;
    
  • Save and compile the RPG program.
This will place a message near the customer number field when an error occurs, which I think is a little nicer than than popup window.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Overlaying window on screen

Post by Scott Klement »

If you wish to use a popup window like the one in your example, that would also work. To do that, please do the following:

In the display file:
  1. Open CUSTINQ1D in the Visual Designer
  2. Add a second record format. Change the "record format name" to the name you'd like to use. I used ERRORS
  3. Click your format name in the record formats area of the designer. The properties should then show the "Screen Properties"
  4. Find the "show as window" property and change it to true.
  5. Add a panel widget, label, and button to show the screen the way you want (I made mine look like the one in your screenshot)
  6. Save and compile the display file.
In the RPG program:
  1. Open CUSTINQ1R in RDi or a similar program.
  2. Find the following code:

    Code: Select all

               If Not %Found();
                 CSNAME = '';
               EndIf;
    
    Change it to:

    Code: Select all

               If Not %Found();
                 CSNAME = '';
                 exfmt ERRORS;
               EndIf;
    
  3. Save and compile the RPG program
Notice that since you used "show as window", Profound UI treats it as a window and automatically overlays the previous screen. You can also drag the heading of the error message with your mouse to move the window around the display, which can be helpful for the user.

The reason I prefer the "error messages" property, however, is that it points directly to the field with the error. In a screen with many fields, this can be very helpful.

This is only a very small sample of the options in Profound UI -- there are many different ways that you might use to display and handle errors, depending on the needs of your application. Let us know if you have additional questions!
nihate
New User
Posts: 3
Joined: Sat Nov 27, 2021 1:46 am
First Name: Nihat
Last Name: Ezer
Company Name: anadolusigorta
Contact:

Re: Overlaying window on screen

Post by nihate »

Yes, it worked like a charm :)

How could i do both this and popup window within the open source version of the profound ui js framework?
Attachments
1.png
1.png (9.63 KiB) Viewed 4159 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Overlaying window on screen

Post by Scott Klement »

Are you referring to the free trial of Profound UI that we sent you last week?

Or, are you referring to the open source framework, here?
https://github.com/ProfoundLogic/profoundui-framework
nihate
New User
Posts: 3
Joined: Sat Nov 27, 2021 1:46 am
First Name: Nihat
Last Name: Ezer
Company Name: anadolusigorta
Contact:

Re: Overlaying window on screen

Post by nihate »

Yes, i am referring to the open source framework from the github
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Overlaying window on screen

Post by Scott Klement »

The open source framework was created as a way to protect customers against "vendor lock-in".

Customers were raising concerns that they were putting a lot of time and effort into building screens in the Profound UI framework, and asking things like "What happens if Profound Logic stops supporting this?" or "What happens if we do all of this work, and they go out of business?". This is very unlikely, because this has been a very successful product for Profound -- so we are doing well, and in no danger of stopping or going out of business.

But, still, customers wanted a more concrete reassurance. So we introduced the Open Source Framework, and proved that it could run our screens. This way, you could take over the framework yourself if we no longer supported it. You'd need to hire clever programmers who can understand how the code works -- but, it's all there, and you'll be able to run your screens. Now you are in no danger of being locked into a vendor that could disappear -- the framework is open source, so publicly available for as long as people want it.

That said -- nobody really uses this framework -- it's there for reassurance.

What we do is offer our commercial solutions -- such as the Profound UI tool that we recently built a special Turkish build of for you. The commercial tools use the same framework under the covers, but they make it all easy to use. This is what we offer support for. We are a business, and we need to make money to pay our employees.

If you want to use the open source code, you're welcome to -- but, it'll be up to you to figure out how it works.

Here's a hint: Try your overlaid screen in the commercial version, and use the browser's debugging tools to see the format of the JSON data that's being sent to the framework. Then, write your own programs that reproduce that behavior.
DButler
New User
Posts: 15
Joined: Tue Jan 18, 2022 6:45 pm
First Name: Donald
Last Name: Butler
Company Name: BloodworksNW
Contact:

Re: Overlaying window on screen

Post by DButler »

Hi Scott,
What is the preferred messaging strategy for ProfoundUI? Is it "message text" and "error condition" as described below? Are message subfiles from the green screen days even used with this tool?

Thanks
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Overlaying window on screen

Post by Scott Klement »

DButler,

This is a discussion about overlaying windows and the difference between the open source and commercial versions of Profound UI. I have no context to understand what you are asking about messaging. I suspect you replied to the wrong thread?

Profound UI does support message subfiles. In my opinion, they are an old-fashioned, green-screen, way to do things that I would not recommend for modern programs. But, they do work.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest