Dynamic drop down
-
- New User
- Posts: 10
- Joined: Fri Oct 31, 2014 9:26 am
- First Name: Regupathy
- Last Name: Ragavan
- Company Name: IBM
- Contact:
Dynamic drop down
Hi Team
I am very new to Profound, but have experience of about 10 years in RPG programming. We are trying to modify our dspf with profound and I have a doubt in dynamic drop down.
Here, I have created a menu screen using Profound UI where the user can select Main menu and sub menu. When the user clicks submit button, the program related to the submenu should be called.
For this I have created a PF, to store Main menu, sub menu and the calling program details. I also loaded the Main menu details directly into the screen using the dynamic drop down properties.
Here, I have problem with populating the submenu entries. The submenu should be loaded based on the value selected on the Main menu. Could anyone please help me on this
Regards
Regu
I am very new to Profound, but have experience of about 10 years in RPG programming. We are trying to modify our dspf with profound and I have a doubt in dynamic drop down.
Here, I have created a menu screen using Profound UI where the user can select Main menu and sub menu. When the user clicks submit button, the program related to the submenu should be called.
For this I have created a PF, to store Main menu, sub menu and the calling program details. I also loaded the Main menu details directly into the screen using the dynamic drop down properties.
Here, I have problem with populating the submenu entries. The submenu should be loaded based on the value selected on the Main menu. Could anyone please help me on this
Regards
Regu
-
- Profound User
- Posts: 45
- Joined: Tue Mar 11, 2014 2:50 pm
- First Name: William
- Last Name: Negley
- Company Name: Utz Quality Foods
- Contact:
Re: Dynamic drop down
How do your menu's work? Is it two drop downs, the first being the main menus and the second as sub menus?
-
- New User
- Posts: 10
- Joined: Fri Oct 31, 2014 9:26 am
- First Name: Regupathy
- Last Name: Ragavan
- Company Name: IBM
- Contact:
Re: Dynamic drop down
Yes. My screen has two dropdowns
-
- 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: Dynamic drop down
We'd be happy to help.
Can you explain what you've done, and what part doesn't work? Code examples might also be helpful.
Can you explain what you've done, and what part doesn't work? Code examples might also be helpful.
-
- New User
- Posts: 10
- Joined: Fri Oct 31, 2014 9:26 am
- First Name: Regupathy
- Last Name: Ragavan
- Company Name: IBM
- Contact:
Re: Dynamic drop down
Hi Scott
Please find the details as below.
MY REQUIREMENT:
I have several programs that need to be put up in a menu screen. For this, I have created a screen in profound that has main menu and submenu. First the user should select the main menu. Then , the submenu entries should be populated based on the main menu selected. After which, the user can press the SUBMIT button to go to the preferred sreen.
OBJECTS:
MENUF: This physical file holds all the main menu, submenu , calling program details. I have attached a file structure and sample screenshot of the entries
MENUFM :This is the display file that has two drop downs and two buttons.
1. Drop down 1 : This is the main menu. It is loaded from the MENMAIN field from my MENUF physical file. I have used "choice database field" property to load the value
2. Drop down 2 : This is the submenu. It should be loaded based on the value selected from Main menu. For example, If I select Employee as main menu, then the submenu should automatically populate all the submenus that belong to Employee.
3. Submit : To accept the drop down 1 and drop down 2 parameters and call the respective program
4. Exit : Button, to get out from the screen
MENUR : This is RPGLE program
I also have a CL program that sets the library list and call the MENUR program.
ISSUE:
My issue here is, I am unable to load the submenu based on the entries from the main menu. As of now, I am loading both the menus in the sameway by adding the choice database field correspondingly. So when I launch the MENUR program, both the menu entries are getting loaded at once and as a result I am getting all values in submenu regardless of the selection from MAIN menu.
For the drop down menu, I could see a property "choice selection criteria" but not sure on what should be done for the same. I have attached the source codes of all the objects with this post.
Thanks a lot in advance for your help.
Regards
Regu
Please find the details as below.
MY REQUIREMENT:
I have several programs that need to be put up in a menu screen. For this, I have created a screen in profound that has main menu and submenu. First the user should select the main menu. Then , the submenu entries should be populated based on the main menu selected. After which, the user can press the SUBMIT button to go to the preferred sreen.
OBJECTS:
MENUF: This physical file holds all the main menu, submenu , calling program details. I have attached a file structure and sample screenshot of the entries
MENUFM :This is the display file that has two drop downs and two buttons.
1. Drop down 1 : This is the main menu. It is loaded from the MENMAIN field from my MENUF physical file. I have used "choice database field" property to load the value
2. Drop down 2 : This is the submenu. It should be loaded based on the value selected from Main menu. For example, If I select Employee as main menu, then the submenu should automatically populate all the submenus that belong to Employee.
3. Submit : To accept the drop down 1 and drop down 2 parameters and call the respective program
4. Exit : Button, to get out from the screen
MENUR : This is RPGLE program
I also have a CL program that sets the library list and call the MENUR program.
ISSUE:
My issue here is, I am unable to load the submenu based on the entries from the main menu. As of now, I am loading both the menus in the sameway by adding the choice database field correspondingly. So when I launch the MENUR program, both the menu entries are getting loaded at once and as a result I am getting all values in submenu regardless of the selection from MAIN menu.
For the drop down menu, I could see a property "choice selection criteria" but not sure on what should be done for the same. I have attached the source codes of all the objects with this post.
Thanks a lot in advance for your help.
Regards
Regu
- Attachments
-
- MENU Screen.zip
- (23.86 KiB) Downloaded 393 times
-
- Profound User
- Posts: 45
- Joined: Tue Mar 11, 2014 2:50 pm
- First Name: William
- Last Name: Negley
- Company Name: Utz Quality Foods
- Contact:
Re: Dynamic drop down
The choice selection criteria should work for what you are trying to accomplish.
In javascript, when you change the first main menu select box. You would then apply the selection criteria parameter. After applying the parameter, you will need to refresh the select box. This all can be done with two lines of javascript.
The applyProperty javascript function: http://www.profoundlogic.com/docs/displ ... opValue%29
In javascript, when you change the first main menu select box. You would then apply the selection criteria parameter. After applying the parameter, you will need to refresh the select box. This all can be done with two lines of javascript.
The applyProperty javascript function: http://www.profoundlogic.com/docs/displ ... opValue%29
- Attachments
-
- MENUFM.txt
- (6.19 KiB) Downloaded 427 times
-
- javascript.png (25.88 KiB) Viewed 2233 times
-
- selectBox.png (20.81 KiB) Viewed 2233 times
-
- New User
- Posts: 10
- Joined: Fri Oct 31, 2014 9:26 am
- First Name: Regupathy
- Last Name: Ragavan
- Company Name: IBM
- Contact:
Re: Dynamic drop down
Thank you very much. It is working fine now.
1 thing. I used MENPGM value in choice values field as mentioned in your screenshot. But my program is showing blank value when launched. I checked the same by debugging the source. Please find my updated RPG program as below.
Regards
Regu
1 thing. I used MENPGM value in choice values field as mentioned in your screenshot. But my program is showing blank value when launched. I checked the same by debugging the source. Please find my updated RPG program as below.
RPG CODE
Could you please help me on where it is going wrong. Or do I need to perform CHAIN operation using both the dropdowns and retrieve the same from the file?Regards
Regu
-
- Profound User
- Posts: 45
- Joined: Tue Mar 11, 2014 2:50 pm
- First Name: William
- Last Name: Negley
- Company Name: Utz Quality Foods
- Contact:
Re: Dynamic drop down
It will be blank, you will need to use the bound field of dpdown2.
So it would be:
IF BtnSubmit = *On
C CALL dpdown2
C ENDIF
So it would be:
IF BtnSubmit = *On
C CALL dpdown2
C ENDIF
-
- New User
- Posts: 10
- Joined: Fri Oct 31, 2014 9:26 am
- First Name: Regupathy
- Last Name: Ragavan
- Company Name: IBM
- Contact:
Re: Dynamic drop down
Hi negley
I will check this and get back to you. Thanks a lot for your quick reply
Regards
Regu
I will check this and get back to you. Thanks a lot for your quick reply
Regards
Regu
-
- Profound User
- Posts: 80
- Joined: Mon Apr 20, 2009 11:26 am
- First Name: Devin
- Last Name: St. Germain
- Company Name: Dupre Logistics, LLC
- Phone: 337.314.2259
- Address 1: 201 Energy Pkwy. Ste. 500
- City: Lafayette
- State / Province: Louisiana
- Zip / Postal Code: 70508
- Country: United States
- Contact:
Re: Dynamic drop down
Is there a way to set the a second 'choices parameter value'? I have tried using the property 'choices parameter value 2', but that did not work. Is it named something else?
Thanks.!!
Thanks.!!
Who is online
Users browsing this forum: No registered users and 2 guests