Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

HTML TextArea field not accepting identical character strings between 2018.1 and 2018.2

VSA
5 - Atom

BLOT: I am not sure if something I am unaware of changed, or if something I did broke the widget.

 

My group recently updated to 2018.2 (and/or 2018.3) from 2018.1 to take advantage of the updates for HTML password decryption. In upgrading and reinstalling widgets, it appears that part of the HTML setup for our widgets that was successful before is no longer successful. The textArea field will no longer hold the string it previously did.

 

Synopsis:

We are building widgets with the Python SDK setup.

We have four input fields defined in our HTML file. The first three are text (one is a password field), and the last has a DataType of TextArea. The HTML for the 4th field looks like this:

  <label>XMSG("SQL")</label>
    <ayx data-ui-props = "{type: 'TextArea', placeholder: 'Enter SQL'}" data-item-props =
      "{
        dataName: 'SQL',
        dataType: 'SimpleString',
        anchorIndex:'0',
        connectionIndex:'0'
      }"
    >
    </ayx>

 

We have quite a large query, coming in at over 50k characters (yes, this is ridiculous, but did work before). There are two things happening:

1. Opening previously created workflows, the query text in the widgets disappears/gets deleted upon run or autoconfigure.

2. When trying to insert the same text (SQL query) into the widget, it will not remain. i.e. you can paste, but if you navigate away, it deletes itself/is not accepted.

2 REPLIES 2
RyanSw
Alteryx Alumni (Retired)

I just tested, and couldn't reproduce the issue using this as a tool:

<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <title>Test</title>

  <script type="text/javascript">
    document.write('<link rel="import" href="' + window.Alteryx.LibDir + '2/lib/includes.html">');
  </script>
</head>
<body>
    <label>XMSG("SQL")</label>
    <ayx data-ui-props = "{type: 'TextArea', placeholder: 'Enter SQL'}" data-item-props =
      "{
        dataName: 'SQL',
        dataType: 'SimpleString',
        anchorIndex:'0',
        connectionIndex:'0'
      }"
    ></ayx>
</body>
</html>

My first guess is, perhaps if you could look into your plugin and verify that you don't have any other data items with the `dataName` of `SQL`, as that would be 1 way to run into such an issue.

 

I would ask if you could test the exact tool I just posted, and let me know if it suffers similar problems in regard to saving and loading.

 

If it's at all possible that you could share your tool that's having this issue with Alteryx, we would be glad to take a look at it. You needn't post it publicly here; but if you could contact customer support and send it to them, it would be appreciated!

 

Sorry I don't have an immediate answer for you!

VSA
5 - Atom

Hello Ryan!

 

As you said below, if I adjust the html to the below, without my other fields, I do NOT experience the same issue (does the password field complicate something??). I have sent my full project on to Blythe Early responding to a follow up email, but have no issue posting in a more public setting either if that is necessary. I have no issues if my SQL string is 30-40k characters, but over that, I see the issue.

 

Otherwise, the entirety of the html as it stands today:

<!DOCTYPE html>
<html style="padding:20px">
<head>
  <meta charset="utf-8">
  <title>IBM User Inputs</title>
  <script type="text/javascript">
    document.write('<link rel="import" href="' + window.Alteryx.LibDir + '2/lib/includes.html">');
  </script>
</head>
<body>
  <label>XMSG("User Name")</label>
    <ayx data-ui-props = "{type: 'TextBox', placeholder: 'Enter TBA user ID'}" data-item-props =
      "{
        dataName: 'User',
        dataType: 'SimpleString',
        anchorIndex:'0',
        connectionIndex:'0'
      }"
    >
    </ayx>
  <label>XMSG("Password")</label>
    <ayx data-ui-props = "{type: 'TextBox', placeholder: 'Enter TBA password'}" data-item-props =
      "{
        dataName: 'Password',
        password: true,
        encryptionMode: 'machine',
        anchorIndex:'0',
        connectionIndex:'0'
      }"
    >
    </ayx>    
  <label>XMSG("Database")</label>
    <ayx data-ui-props = "{type: 'TextBox', placeholder: 'Enter database'}" data-item-props =
      "{
        dataName: 'Database',
        dataType: 'SimpleString',
        anchorIndex:'0',
        connectionIndex:'0'
      }"
    >
    </ayx>
  <label>XMSG("SQL")</label>
    <ayx data-ui-props = "{type: 'TextArea', placeholder: 'Enter SQL'}" data-item-props =
      "{
        dataName: 'SQL',
        dataType: 'SimpleString',
        anchorIndex:'0',
        connectionIndex:'0'
      }"
    >
    </ayx>            
  <script type="text/javascript">                     
    Alteryx.Gui.BeforeLoad = (manager, AlteryxDataItems, json) => {
    }
    Alteryx.Gui.AfterLoad = (manager) => {
    }
  </script>
 
</body>
</html>