0

Data issue - loop failure

I have a table with 11000 + records and I am trying to identify patterns but the the loop doesnt work through the table. The body works fine and sets the choice etc.

The loop needed has seen me try all looping structures to no avail.  The code appended below is on the form for tthe table in a button.  The button chnages colour when executing and runs for a few minutes.  No error is shown.  Could this reflect a data corruption?  I exported to CSV yesterday and re-imported and set an index field but no better.

do as server
var wtxt := " ";
var arec := (select IR_SNow_Apps_to_OSIs);
var q := 0;
let cstop := count(arec);
for i in range(0, cstop) do
let a := item(arec, i);
q := index(a.app_id_name, "-");
if q > 0 then
IdxTC1 := q;
TypeChoice1 := 1
else
wtxt := a.app_id_name;
let r := index(wtxt, " ");
if r > 0 then
IdxTC1 := r;
TypeChoice1 := 2
else
IdxTC1 := 0;
TypeChoice1 := 3
end
end;
wtxt := substr(a.app_id_name, IdxTC1 + 1, length(a.app_id_name));
let p := index(wtxt, "-");
if p > 0 then
idxTC2 := p;
TypeChoice2 := 1
else
let r := index(wtxt, " ");
if r > 0 then
idxTC2 := r;
TypeChoice2 := 2
else
idxTC2 := 0;
TypeChoice2 := 3
end
end
end
end

Could it be that in a effort to speed things up and use an array that I am simply not getting it back into the record?

Ideas please?  Thank you in advance.

1 reply

null
    • Sean
    • 4 yrs ago
    • Reported - view

    Phillip,

     

    I'm pretty sure the limitation is with the cloud server. I'm not sure what their rules are regarding loops and you would need to contact Ninox directly to get that information. If you do get an answer, please post it here.

     

    I don't know if you have access to a Mac or an iPad, but it would be money well spent if you got the app for one or the other. It should take less than a minute to run through those records and I'm speaking from experience... https://ninox.com/en/forum/use-cases-5abd0b9c4da2d77b6ebfa395/duplicate-marking-utility-for-large-datasets-5e2d30194e9f3771e468dd52

     

    I would lose the array and just use... for i in arec