Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to get First field name by use HTML GUI SDK in PluginGui.html

flying008
15 - Aurora

Dear all, hello!

 

I am thinking about writing a javascript plugin. Now I have a question: how can I use what code in the Alteryx.Gui.BeforeLoad or Alteryx.Gui.AfterLoad function in PluginGUI.html to get the names of all the fields or the name of the first field in the input data stream?


I am sorry that I cannot do anything on the back engine. Due to various restrictions, I can only get the field column name in these  functions of the html gui sdk, because I want to pass the result value to the dataItem named textbox based on this field name.


Since the information I found did not introduce this technique, could you please give me a template code example when you are free? Thank you very much!

 

 

****PluginConfig.xml****

 

 

<AlteryxJavaScriptPlugin>
    <InputConnections>
      <Connection Name="Input" AllowMultiple="False" Optional="False" Type="Connection" Label="I"/>
    </InputConnections>
****
</AlteryxJavaScriptPlugin>

 

 

 

***PluginGui.html

 

 

<script type="text/javascript">

    Alteryx.Gui.BeforeLoad = function(manager, AlteryxDataItems, json) {
        var configuration = json.Configuration;
// *** I need some code line to get the first field name of input datastream.
    };

    Alteryx.Gui.AfterLoad = function(manager, AlteryxDataItems) {
// *** I need some code line to get the first field name of input datastream.  like manager.GetMetaInfo() ???
    };

</script>

 

 

 

0 REPLIES 0
Labels
Top Solution Authors