Tables And Lists In Code Creator

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
It would be nice if we could just press a button and create the code for tables and lists in Code Creator. Because honestly I must be dense or something but I can see where there is code for interfacing with tables and lists, but haven't found anything on the assemblies documentation on how to create them in the first place....

HELP DD OR SHADE! :huh:

Can you provide the code for us please?!
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
JavaScript:
var list = project.Lists["List1"]; //read list to a variable
list.Add("line"); //add line to a list
var firstLineOfLIst = list[0]; //first line of the list
var r = new Random(); 
var randomLineFromList = list[r.Next(0,list.Count)]; //random line of the list
list.Remove("line"); //remove line from list by value
list.RemoveAt(0); //remove line from list by index
list.Insert(0,"new line"); //insert line in the first place in the list
quite similar with tables
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
I tried adding just a line to the list and I get 'Object reference not set to an instance of an object'.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)