Is is possible to consolidate two green screens into one on browser.
-
- New User
- Posts: 13
- Joined: Fri Jan 28, 2022 6:47 pm
- First Name: Sunil
- Last Name: Gonchigar
- Company Name: NTT Data
- Contact:
Is is possible to consolidate two green screens into one on browser.
Hello, Wondering if it is possible to consolidate two/multiple screens into one on browser using Genie without changing the RPG code. Example we have one screen to search by customer number and another to search by customer name. A function key is used to toggle between the two. I was thinking if we can put these two green screens as two tab window. I went thru some of the other posts. Would you point me to multiStepAction examples.
-
- New User
- Posts: 13
- Joined: Fri Jan 28, 2022 6:47 pm
- First Name: Sunil
- Last Name: Gonchigar
- Company Name: NTT Data
- Contact:
Re: Is is possible to consolidate two green screens into one on browser.
Hello, any suggestions as how to accomplish this. we have a subfile, option 5 to display the record in detail, detail_screen1, detail_screen2, detail_ screen3, detail_screen4. 5250 navigation to each detail screen is "enter key". On last screen, enter takes you back to the subfile. I would like to see if we can load detail_screen2,3 and 4 on detail_screen1.
-
- New User
- Posts: 13
- Joined: Fri Jan 28, 2022 6:47 pm
- First Name: Sunil
- Last Name: Gonchigar
- Company Name: NTT Data
- Contact:
Re: Is is possible to consolidate two green screens into one on browser.
I tried this:
1. declared global variable in custom.js: var savedScreenData = [];
2. On Detail_Screen1:
3. On Detail_Screen2: onpageload, I am trying to display previous screen values but shows current/Detail_screen2 data instead of detail_screen1
1. declared global variable in custom.js: var savedScreenData = [];
2. On Detail_Screen1:
Code: Select all
.... onpageload: "screen": { "screen_name": "Client ID", "onpageload": "\n", "onload": "savedScreenData.push(getAllFields()); \nvar steps =
[];\nsteps.push(\"pressKey('Enter')\");\nmultiStepAction(steps);" },
Code: Select all
for (var i = 0; i < savedScreenData.length; i++) {
var fields = savedScreenData[i];
for (var j = 0; j < fields.length; j++) {
var field = fields[j];
var value = get(field.id);
console.log(field + ' ' + value);
}
}
-
- 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: Is is possible to consolidate two green screens into one on browser.
I don't understand what you're trying to achieve.
The way the code reads: Save all elements on screen1. If the same element exists on screen2, log it to the console. It's not clear why someone would want to do that?
The way the code reads: Save all elements on screen1. If the same element exists on screen2, log it to the console. It's not clear why someone would want to do that?
-
- New User
- Posts: 13
- Joined: Fri Jan 28, 2022 6:47 pm
- First Name: Sunil
- Last Name: Gonchigar
- Company Name: NTT Data
- Contact:
Re: Is is possible to consolidate two green screens into one on browser.
all I was trying to do was to save screen1 elements and use it on screen2. that console -display was just a test to see if I am getting the screen1 data. Would like to see if screen1, screen2 and screen 3 be made available on screen 4 to consolidate 1,2,3 into 4.
-
- 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: Is is possible to consolidate two green screens into one on browser.
Keep in mind that if you add elements that weren't on the original screen, you won't be able to submit them back to the program running on the server, because it is reading the record format of a DDS screen that won't have the elements you've added.
If they are output-only type things, it should work fine.
However, when you call get(field.id) you are reading the IDs from the previous screen, but using them to do a get() of elements on the current screen. You'd have to add the elements to the current screen before you could try to use get() on them.
If they are output-only type things, it should work fine.
However, when you call get(field.id) you are reading the IDs from the previous screen, but using them to do a get() of elements on the current screen. You'd have to add the elements to the current screen before you could try to use get() on them.
-
- Profound User
- Posts: 29
- Joined: Wed Sep 08, 2021 1:01 pm
- First Name: Sunny
- Last Name: Krowski
- Company Name: United Cerebral Palsy Arkansas
- Phone: (501) 224-6067
- Address 1: 9720 N Rodney Parham Rd
- City: Little Rock
- State / Province: Arkansas
- Zip / Postal Code: 72227
- Country: United States
- Contact:
Re: Is is possible to consolidate two green screens into one on browser.
You can hide fields on screen one and then you have them when you are on screen 2 but don't have to see them on screen 1.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 2 guests