corbinhand Posted February 24, 2022 Share Posted February 24, 2022 (edited) Has anyone built a marionette node for a dropdown in the OIP based on a worksheet (or list) ? I have figured out how to use the "popup dialogue" node for this, but it doesn't meet my needs completely. An OIP dropdown would make my life much simpler. Screenshot of how I am currently doing it below. Edited February 24, 2022 by corbinhand clarity Quote Link to comment
Pat Stanford Posted February 25, 2022 Share Posted February 25, 2022 The thread below asked basically the same question. But it quickly switched to German. But it might help you figure out the direction you need to go. Quote Link to comment
KingChaos Posted February 25, 2022 Share Posted February 25, 2022 (edited) hi, Yes i am searching for a pulldown solution for this. But you dont need the lists, you can let VWX do it. The question here is, how many choices you need? Without script knowledge i cant modify this "enhanced popup" node, made by @MRoth. I only typed manually in the node which selection i want to pulldown. enclosed u got the node. pm me if u like. br KC datenbankausleser.vwxenhanced popup.vwx Edited February 25, 2022 by KingChaos Quote Link to comment
KingChaos Posted February 25, 2022 Share Posted February 25, 2022 i need a multilevel pulldown, where 1. choice influences what 2. choice can pick. but i only got gw-basic programming skills, so vector or pythonscript is not my competence. Quote Link to comment
corbinhand Posted February 25, 2022 Author Share Posted February 25, 2022 9 hours ago, KingChaos said: hi, Yes i am searching for a pulldown solution for this. But you dont need the lists, you can let VWX do it. The question here is, how many choices you need? Without script knowledge i cant modify this "enhanced popup" node, made by @MRoth. I only typed manually in the node which selection i want to pulldown. enclosed u got the node. pm me if u like. br KC datenbankausleser.vwxenhanced popup.vwx This doesn't really solve my problem, I need the list to reference a worksheet. Quote Link to comment
corbinhand Posted February 25, 2022 Author Share Posted February 25, 2022 16 hours ago, Pat Stanford said: The thread below asked basically the same question. But it quickly switched to German. But it might help you figure out the direction you need to go. Thanks Pat, Ill have to brush up on my German! Quote Link to comment
KingChaos Posted February 25, 2022 Share Posted February 25, 2022 I made a pulldown out of the spreadsheet content. You checked the net i upped? Quote Link to comment
corbinhand Posted February 25, 2022 Author Share Posted February 25, 2022 26 minutes ago, KingChaos said: I made a pulldown out of the spreadsheet content. You checked the net i upped? If you mean the one with the "popup dialog" node, yes. That one doesn't work for me. I want the pull down to be in the OIP, not a pop up window. Quote Link to comment
SimA Posted February 25, 2022 Share Posted February 25, 2022 1 hour ago, KingChaos said: pulldown 1 hour ago, corbinhand said: in the OIP Hello corbinhand, check the knot of MRoth. The selection menu is in the OIP, only the list input is missing. do you know the scripting language of marionette? 2 hours ago, corbinhand said: German https://translate.google.com Google is fine... Quote Link to comment
SimA Posted February 25, 2022 Share Posted February 25, 2022 Hello @Pat Stanford There is no solution in German yet. MRoth's knot works great. @MRoth Thanks! This node with a list entry would be gold right for me. The input and processing in the node would have to be adjusted. The last value used must continue to be used and should only be changed if it is selected again. Can you help us? Quote Link to comment
corbinhand Posted February 25, 2022 Author Share Posted February 25, 2022 (edited) I will try to be more precise with my issue: I need the Marionette.WidgetType.Popup to reference the list of items imported into the node. I'm having a problem figuring out how to make that happen. The widget won't allow me to directly reference "dListItems" (my ported in list), and I'm not sure of the solution. I do not want to use the "options" input (as created by @MRoth), because I want to be able to update it via a worksheet. class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'Tour OIP Popup' ) #Input Ports dListItems = Marionette.PortIn( [], "listChoices" ) options = ('option 0', 'option 1', 'option 2', 'option 3', 'option 4' ) #OIP Controls input = Marionette.OIPControl( 'Tour', Marionette.WidgetType.Popup, 0, options ) #Output Ports int = Marionette.PortOut('i') int.SetDescription('The zero-based index of the selection.') str = Marionette.PortOut('s') str.SetDescription('The string of the selection.') #BEHAVIOR this.SetListAbsorb() def RunNode(self): #inputs int = self.Params.input.value str = self.Params.input.value dListItems = self.Params.dListItems.value #script str = dListItems[int] #outputs self.Params.int.value = int self.Params.str.value = str Edited February 25, 2022 by corbinhand Quote Link to comment
SimA Posted February 25, 2022 Share Posted February 25, 2022 genau das möchte ich auch. Die Auswahl möchte ich in der OIP treffen. Ich habe auch bereits einen Verweis wie bei Excel aufgebaut... Das Script kann ich dir nicht erstellen, ich bin Schreiner. that's exactly what I want too. I would like to make the selection in the OIP. I have already created a reference like in Excel... I can't create the script for you, I'm a carpenter. @KingChaos is also looking for the same solution as you @corbinhand and me. 1 Quote Link to comment
KingChaos Posted February 25, 2022 Share Posted February 25, 2022 Cant you create an input Port with the list u get out of your spreadsheet and put this input into the choice? Quote Link to comment
DomC Posted February 26, 2022 Share Posted February 26, 2022 Hello The Custom Popup Widget from the Nodes, are generated by editing the Nodes. There are some special Popups which are handled by the Marionette core itself. As example the class popup. If you add classes the popup will contain that new class. You can generate the popup items with a script from a worksheet. No question. Lets say, you can say the popup the have those items from the worksheet by script. You have to run the script to deliver the items of the popup. If you click on a popup with items generated like this and you do not run the network your popup has no data because no script was executet. So what can be done without manipulationg the core too much: 1. Create a node with a popup, which takes items from the input. You have to run the network bevor the items are activated. (Example Attached) 2. Create a dialog push Button or a Dialog which runs when the script runs. 3. Dis Dialog has his own popup and can be generated with every functionality of script engine. 4. Having a seperate script (as example in the worksheet), which will push the worksheet changes to the node popups widgets. probably it could be possible to manipulate or generate the popup in the Marionette class but it is not something I grabbed before and I guess I would not provide public. So the best option in my opinion is #2, where we have a push button with the popup. The popup will always be up to date. Maybe an issue, if the push-button is nested too deep in wrappers and Object Nodes. So if you do something, always check if it works in your final product. But also this could be an issue with the other variants. Here the example, how to overwrite the node-popup from outside. Also this technique is provided a long time ago in the gallery. The Node is just a proof of concept, you cant use it without edit the node code for your own usage. I try to make an Example in the Gallery, which takes a worksheet input and have a push button for choosing the popup. Because this sounds for me very useful for many Marionette users and developpers. the interesting think is, that there will be two popup. The first popup will allow to filter the items of the second popup. I think this is not a big thing but as I can remember last Time i made a popup with changing items, i did not known how to eliminate the vestige of deleted popup items. Dynamic Popup.mp4 PopupfromWorksheet.vwx 2 1 Quote Link to comment
SimA Posted February 26, 2022 Share Posted February 26, 2022 @DomC Danke, genau das habe ich gebraucht! 1 Quote Link to comment
corbinhand Posted February 27, 2022 Author Share Posted February 27, 2022 (edited) @DomC can you add an output to the popup node that outputs the string of the selection? Edited February 27, 2022 by corbinhand Quote Link to comment
DomC Posted February 27, 2022 Share Posted February 27, 2022 Like I told I do not work on that node, just a proof of concept and you had to edit the node code to make it usable. I think I want to provide a useful node maybe but not now. However, the popup delivers an index and this index corresponding to the lines in the popup and the lines in the worksheet. You could do this to return the value of popup instead of index. self.Params.output.value = j['data'][0]['popupChoices'][input]['text'] Or this, to return the line from the worksheet (which is the better option) self.Params.output.value = lines[input] input is the popup index. 2 1 Quote Link to comment
KingChaos Posted February 28, 2022 Share Posted February 28, 2022 On 2/26/2022 at 10:05 PM, SimA said: @DomC Danke, genau das habe ich gebraucht! Also du konntest damit was anfangen? 😮 Ich verstehe nur Bahnhof. Quote Link to comment
corbinhand Posted February 28, 2022 Author Share Posted February 28, 2022 I am not able to view this dropdown in the OIP after wrapping the network. It seems like it's not possible. Quote Link to comment
SimA Posted February 28, 2022 Share Posted February 28, 2022 15 hours ago, KingChaos said: was anfangen Ich denke, damit kann ich arbeiten. Habe noch etwas am Netzwerk gemacht. Mich stören allenfalls mögliche Duplikate, die konnte ich noch nicht eliminieren. Gegebenenfalls muss die Tabelle auch mal sortiert werden (ABC) das geht auch nicht direkt im Netzwerk. Ich denke jedoch, dass dies einfach mit einem Tabellenfilter gemacht werden kann. PopupfromWorksheet v2020.vwx Quote Link to comment
SimA Posted February 28, 2022 Share Posted February 28, 2022 1 minute ago, SimA said: Tabellenfilter Import und Export in Excel... Quote Link to comment
DomC Posted February 28, 2022 Share Posted February 28, 2022 (edited) 4 hours ago, corbinhand said: I am not able to view this dropdown in the OIP after wrapping the network. It seems like it's not possible. Like I told, you need to run the network, which pulls the values from the table. then you have to deselect and reselect the node. And then the popup is there. but not on the wrapper or a Marionette PIO, because this Node has an input and nodes with an connected Input will not shown on the wrapper or a Marionette PlugIn. Thats why option #2 is the only proper solution. The posted example is option #1. Edited February 28, 2022 by DomC Quote Link to comment
corbinhand Posted March 2, 2022 Author Share Posted March 2, 2022 The trouble with the dialogue is, its annoying. Every time the wrapper or object node is updated, the alert dialogue appears. Quote Link to comment
DomC Posted March 9, 2022 Share Posted March 9, 2022 @corbinhand Have you already checked this out? 1 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.