Jump to content
UBot Underground

displaying data from table in a ui drop down


Recommended Posts

Hi,

 

I've been trying different things for a few hours now and am resorting to going to forums. Can someone please tell me how one populates ALL rows of a table but only on, let' say, column 6 of each row, in a ui drop down?

 

Any help would be greatly appreciated as I stumped.

 

Thanks in advance.

Edited by big dog status
Link to post
Share on other sites

can you explain a bit more with an example? are you saying that you have a drop down menu with multiple choices, and depending on what is selected from the menu, a table gets updated but has to be in column 6?

 

cheers

Link to post
Share on other sites

sure, sorry about that. I have a fb bot that works using data from a csv file. I want to make it possible to select any account I want from a UI drop down menu. The purpose would be to easily be able to switch between accounts when working instead of going and manually editing my .csv file every time. For example, right now my bot loops through all of the accounts in my .csv, but if I want to say, run account #10 first, (to do some maintenance or hand editing) I am forced to go to my .csv and rearrange my accounts to place the account I need to work on in the first place.

 

Anyways, long story short I just need to be able to add column 0 from every row (in my table) to a ui drop down menu.

 

Thanks for your response.

Link to post
Share on other sites

This is the old way we have hacked it in the passed

 

 

 

on load("Tab Loaded") {
    comment("Edit the file path")
    set(#mydropdown$read file(#FilePath), "Global")
    set(#mydropdown"<option>{$replace(#mydropdown"
""</option>
<option>")}</option>""Global")
}
ui html panel("<div>
<select variable=\"#value\" fillwith=\"value\" style=\"\">
<optgroup variable=\"#mydropdown\" fillwith=\"innerhtml\"></optgroup>
</select>
</div>", 100)

Link to post
Share on other sites

If you have dev you can do it this way,

ui html panel("<!DOCTYPE html>
<html lang=\"en\">
  <head>
    <meta charset=\"utf-8\">
    <meta name=\"generator\" content=\"CoffeeCup HTML Editor (www.coffeecup.com)\">
    <meta name=\"dcterms.created\" content=\"Thu, 07 Nov 2013 17:47:04 GMT\">
    <meta name=\"description\" content=\"\">
    <meta name=\"keywords\" content=\"\">
    <title></title>
    
    <!--[if IE]>
    <script src=\"http://html5shim.googlecode.com/svn/trunk/html5.js\"></script>
    <![endif]-->
  </head>
  <body>
<input type=\"file\" dialogtype=\"open\" variable=\"#CSV\" fillwith=\"value\">
<select list=\"#UI_Table_Rows\" list-fillwith=\"options\" variable=\"#UI_Table_Row_Selection\"></select>
  </body>
</html>", 200)
create table from file(#CSV, &Table)
set(#Row, 0, "Global")
loop($table total rows(&Table)) {
    set(#UI_Table_Rows, "{#UI_Table_Rows}{$table cell(&Table, #Row, 0)},", "Global")
    increment(#Row)
}

Carl  ;)

  • Like 1
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...