Dev Space

Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!
Andy Uttley, Alteryx ACE, makes music with Alteryx | Math + Music
SOLVED

FileBrowse HTML GUI Library as a Directory

Highlighted
5 - Atom

Hi all!

 

I'm getting my feet wet with the Alteryx Python SDK and HTML GUI SDK and am trying to figure out the filebrowse widget.

 

I'd like to have a control in my interface that allows the user to choose a directory vs. a file, but can't seem to figure out what prop to change. I also cant' find the filebrowse widget in the documentation. Code sample below (which still triggers a file picker and not a directory picker).

 

 

 

<ayx data-ui-props = "{type: 'FileBrowse'}" data-item-props =
      "{
        dataName: 'dlPath',
        browseType: 'Directory',
        anchorIndex:'0',
        connectionIndex:'0'
      }"
    >
</ayx>

 

 

 

Thank you!

Highlighted
10 - Fireball

Yeah, it doesn't seem to be in the documentation.  I poked around the designDesktop.bundle.js file to see if I could find anything.  Looks like you want browseType of "Folder".  The tag below gives me a folder picker:

 

<ayx data-ui-props='{type:"FileBrowse", widgetId:"Widget1", browseType:"Folder"}'></ayx>

 

Highlighted
5 - Atom

Awesome!!! Many thanks for the help - this worked perfectly!

Highlighted
8 - Asteroid

Hi @tlarsen7572 ,

 

Do you have any idea, if I need to select any existing connection (similar to saved connections we select in InputData tand Dynamic Input tool tool) then what should I put in BrowseType?

 

Thanks!

Highlighted
10 - Fireball

Hi @RuchikaMangla ,

 

If I had to guess, those saved connections are built into those specific tools and saved somewhere on the disk.  Those tools then load the file with the saved connection info and present them to the user.

 

It is not something that is available via the HTML SDK, as far as I know.  You would have to build a custom solution for saving your own connection data to the disk.  I am not entirely sure how to even do that.

Highlighted
8 - Asteroid

Hi @tlarsen7572 

 

Thanku for your reply. You are right it's not a part of html sdk. I also looked at it but did not find anything.

 

If you won't mind could you please direct me from where should I start to learn creating custom tools using Html sdk. I mean if you can refer some site that would be great!

 

Thanks!