Jump to content
UBot Underground

Help With Basic Ui Dropdown From List


Recommended Posts

Hey all - Sorry for the basic request, but I've searched for the last hour or so and am struggling with something (I'm newish to ubot).

 

I've got a csv file with a few rows & columns, such as:

 

John smith, jsmith@blah.com, password123, homepage,

alex jones, ajones@iuhdiuh.com, password321, homepage,

 

What my goal is, is to make a UI dropdown from the first colum (names).

 

I tried making a table (called &loaded) from the CSV (worked) and then making a list from that table, using 'list from table', to populate the dropdown...

ui drop down("Select",$plugin function("TableCommands.dll", "$list from table", &loaded, "Column", 0),#name)

This is where things go wrong!

 

Instead of the dropdown having the names as two separate items like so:

 

John smith

alex jones

 

It seems to see all the rows for column 1 as the same and puts them like this in the dropdown:

 

'John smith alex jones'

 

... As one option.

 

I've search for help quite a bit, but keep just finding people trying to auto-reload the dropdown (a stage more advanced than what I'm trying to do!). Any help with just populating dropdown items from the first column of a CSV, with a single option for each row? < Is making a table from the CSV, then using a 'list from table' command the right way to do it? 

 

Thanks in advance!

Edited by MikeTheMike
Link to post
Share on other sites

try.

ui drop down("Select",$replace($replace regular expression("John smith, jsmith@blah.com, password123, homepage,
alex jones, ajones@iuhdiuh.com, password321, homepage,",",.*",""),$new line,","),#Select)

 

Link to post
Share on other sites

and from you code

ui drop down("Select",$replace($plugin function("TableCommands.dll", "$list from table", &loaded, "Column", 0),$new line,","),#name)
  • Like 1
Link to post
Share on other sites

Heyyyyyy :D

 

A MASSIVE thanks! The code below works perfectly!

 

You're an absolute star :D

 

and from you code

ui drop down("Select",$replace($plugin function("TableCommands.dll", "$list from table", &loaded, "Column", 0),$new line,","),#name)
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...