Jump to content

Marionette OIP Popup from Worksheet


Recommended Posts

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. 

 

 

Screen Shot 2022-02-24 at 5.39.16 PM.png

Edited by corbinhand
clarity
Link to comment

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.

 

 

image.thumb.png.cb8416c755f307cf7a618c7c87a4353f.png

 

enclosed u got the node.

 

pm me if u like.

 

 

br KC

datenbankausleser.vwxenhanced popup.vwx

Edited by KingChaos
Link to comment
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.

 

 

image.thumb.png.cb8416c755f307cf7a618c7c87a4353f.png

 

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. 

Link to comment
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.

Link to comment

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?

Link to comment

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 by corbinhand
Link to comment

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.

  • Like 1
Link to comment

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.
 

PopupfromWorksheet.vwx

  • Like 2
  • Love 1
Link to comment

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.

  • Like 2
  • Love 1
Link to comment
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

Link to comment
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 by DomC
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...