Cancel
Showing results for 
Search instead for 
Did you mean: 

Find Method doesn't work as expected. Can't find emty Cell

Pioneer
Pioneer

Hi There,

i have a problem with the find method.

I tried to write data in empty cells of a table, by using the find function.

I want to find the next cell with nothing ("") in it, and write data in that cell.

I can't find the problem, why the find method doesn't find any empty cell. I didn't use the yDim and xDim method on purpose, because it always looks for the end of the whole table and not of a single column.

I attached a testfile with the problem.

 

Thank you

regards

Martin

 

3 REPLIES

Re: Find Method doesn't work as expected. Can't find emty Cell

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

look here

 

"" is not empty, see help fo the command finden

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Find Method doesn't work as expected. Can't find emty Cell

Pioneer
Pioneer

Thank you for the quick answer.

I have tried it also with void, but the method still doesn't find anything.

Here a screenshot (somehow i can't attach the .spp file)

example_code.png

 

Tank you

regards

Martin

 

Re: Find Method doesn't work as expected. Can't find emty Cell

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

finden finds only empty cell until tabelle.yDim. You need to expand your condition for the cases, that there are no "gaps" in the table (cell=void at tablerow > table.yDim):

if tabelle.finden...then
...
else
--no empty cell between 1 and tabelle.ydim
Tabelle.schreibeZeile(1,tabelle.yDim+1,Teil,Erzeugungszeitpunkt);
end;

Especially, if the table is empty (yDim=0), your method does not work.

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net