record to empty colum

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
how do i record to a designated row's first empty column?
some are like 3 colums full other are like 2 or 30...
i just need to add data to the NEXT empty column
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 413
Благодарностей
5 900
Баллы
113
This is a task for logic. You should get value of cell in a row and compare it with empty string.
 

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 413
Благодарностей
5 900
Баллы
113

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
JavaScript:
// take text for search from a variable
var textContains =!'';
// get table for search
var sourceTable = project.Tables["SourceTable"];
// search in each row
lock(SyncObjects.TableSyncer)
{
  for(int i=0; i < sourceTable.ColumnCount; i++)
  {
  // read a row (array of cells)
  var cells = sourceTable.GetColumn(i).ToArray();
  // loop through all cells
  for (int j=0; j < cells.Length; j++)
  {
  // check if cell contains specified text, if there are matches return "yes"
  if (cells[j].Contains(textContains))
  return i;
  }
  }
}
// if nothing found return "no"
return "no";
wont run :(
 

PHaRTnONu

Client
Регистрация
01.10.2016
Сообщения
340
Благодарностей
48
Баллы
28
fail

if i would have just done record to cell in Table processing in zenno you can just put a value of "-1" and it will record to the last unused cell for the row you decide

that was much simpler
 

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