Jump to content
UBot Underground

Using List Values to Populate UI Dropdown


Recommended Posts

I'm using 4.0.66 and can't get list values to populate either UI List box ro UI Dropdown. I thought this had been corrected in an earlier release. Here's an example:

 

 

clear table(&DealerVehicles)

clear list(%VehicleYear)

clear list(%VehicleYear2)

create table from file("{$special folder("Desktop")}\\Vehicles.csv", &DealerVehicles)

set(#rowDealerVehicles, 1, "Global")

loop($table total rows(&DealerVehicles)) {

add item to list(%VehicleYear2, $table cell(&DealerVehicles, #rowDealerVehicles, 1), "Don\'t Delete", "Global")

increment(#rowDealerVehicles)

}

add list to list(%VehicleYear, %VehicleYear2, "Delete", "Global")

ui drop down("Vehicle Year", %VehicleYear, #VehicleYear)

ui list box("Vehicle Year", %VehicleYear, #VehicleYear)

 

Snippet of Vehicles.csv

 

Make,Year,Model

Acura,2011,MDX

Acura,2011,RDX

Acura,2011,TL

Acura,2012,TL

Acura,2011,TSX

Acura,2011,TSX Sport Wagon

Audi,2011,A3

Audi,2011,A4

Audi,2011,A5

Audi,2011,A6

Audi,2011,A7

Audi,2012,A7

Link to post
Share on other sites

If you use something like this, it works:

 

clear list(%cars)

define ui list {

add item to list(%cars, $read file("{$special folder("Desktop")}/cars.csv"), "Delete", "Global")

}

ui list()

ui drop down("cars", %cars, #cars)

 

But you need to refresh it by clicking on code view and then back on node view. here is the file I called:

 

 

 

cars.zip

Link to post
Share on other sites
  • 1 month later...

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...