AlHanson Posted December 14, 2023 Share Posted December 14, 2023 Anybody have an approach for getting the options from a pop-up field in a Plug In Object? vs.PopupGetChoices doesn't appear to work with hidden parametric records from everything I've been throwing at it. Tried both field name and localized field names and I always get 0 for the number of values and None for the list returned when used on a PIO Record. Works fine on standard record definitions in the resource browser. This command didn't exist before v2023 so there has to be an alternate approach I'm overlooking... I hope? Quote Link to comment
AlHanson Posted December 14, 2023 Author Share Posted December 14, 2023 (edited) Actually, just figured it out! If anybody else needs the help in the future: Use vs.NumCustomObjectChoices to loop through the index range and vs.GetLocalizedPluginChoice to get the values at that index. Edited December 14, 2023 by AlHanson 1 Quote Link to comment
Jayme McColgan Posted December 15, 2023 Share Posted December 15, 2023 Here's how I get the items that are in a popup. i also use this flow to clear out popups and repopulate them with new values. popupItems = [] ok, parmid = vs.vsoPrmName2WidgetID('', 'Product') popupCnt = vs.vsoWidgetPopupGetCnt(parmid) for i in range(popupCnt): popupItems.append(vs.vsoWidgetPopupGet(parmid, i)) vs.AlrtDialog(str(popupItems)) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.