I have a test stack that has 5 cards. On each card there are two grouped fields.The backgroundbehavior of this group is set to true.
My intention is to run through the stack and check to see if any of those fields in this stack contain the current year.
I cannot get this script to work in any of four ways I write it.
Of these fields, only one contains 2024.
When I step through the debugger, tcount is always 5 or 0 instead of 1 or 4 depending on which option I choose use.
I'm sure it is something simple. I'm just a lot simpler than that.
Code: Select all
on mouseUp
put the long date into tmydate
set the itemdelimiter to ","
put the last item of tmydate into tzzz-- I break things down into small parts just to watch them
put "0" into tcount -- this to watch in the debugger.
repeat with i = 1 to the number of cds of this stack --5 cds with the same grouped flds with background behavior set to true.
--if tzzz is in fld "plop" of cd i then-- this does not work. if statement is ignored
if tzzz is not in fld "plop" of cd i then--this does not work. if statement is ignored
--if tzzz is not in fld "plop" then --this does not work. if statement is ignored
add 1 to tcount
end if
end repeat
end mouseUp