Dynamic Context Menu returns choice (text) not value

Use this board to ask questions or have discussions with other Genie users.
Post Reply
kroberson
New User
Posts: 12
Joined: Fri Jul 27, 2018 11:23 am
First Name: Kevin
Last Name: Roberson
Company Name: National American Insurance Co
Contact:

Dynamic Context Menu returns choice (text) not value

Post by kroberson »

I'm using the menu widget for a context menu on a grid (subfile) that changes the choices programatically, depending on the screen mode (browse, add change, etc.),which is indicated in an output field in the heading ("D_1_2"). Everything works correctly except the menu is returning the choice (selected text) and not the choice value (option number). I'm using this to place the option number in the subfile option field and press Enter. Can anyone see what I'm doing wrong?

Grid Onrowclick:

Code: Select all

// Send row clicked to context menu.
applyProperty("propOpts","user defined data", row);

// Check mode using screen heading and set menu choices.
if (get("D_1_2") === "Browse") {
  applyProperty("propOpts", "choices", "Select Coverage Part/Location");
  applyProperty("propOpts", "choice values", "1");
} else {
  applyProperty("propOpts", "choices", "Select Coverage Part/Location, Copy Location, Insert Bid, Change Loc/Bld Nbr");
  applyProperty("propOpts", "choice values", "1, 3, 6, 7");
}  

// Refresh context menu poperties.
applyProperty("propOpts", "field type", "menu"); 
Menu Onoptionclick:

Code: Select all

var rowNumber = this.pui.properties["user defined data"] + 8;
changeElementValue("I_" + rowNumber + "_2", value);
pressKey("Enter");
User avatar
Emily
Profound Logic Staff Member
Posts: 89
Joined: Tue Jun 21, 2016 8:30 am
First Name: Emily
Last Name: Seage
Company Name: Profound Logic
Contact:

Re: Dynamic Context Menu returns choice (text) not value

Post by Emily »

Hi Kevin,

After looking into this further, I can reproduce the problem that you are having with your menu. It seems like this may be a bug. If you send this information to our support team (support@profoundlogic.com), we can create a support ticket for you and continue to investigate this issue on our end.

Thanks!
Emily Seage
Support Team Lead
kroberson
New User
Posts: 12
Joined: Fri Jul 27, 2018 11:23 am
First Name: Kevin
Last Name: Roberson
Company Name: National American Insurance Co
Contact:

Re: Dynamic Context Menu returns choice (text) not value

Post by kroberson »

Will do! Thanks Emily!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests