May 15, 200817 yr Hi I'm not sure if this is a calculation situation, a script situation or both. I need to find a set of records that is in a date range of "14 days prior to today... to today" on a daily basis and automated with a button/script. In short - click a button and records with that date range would be found. THANKS.
May 15, 200817 yr Something along these lines: Enter Find Mode Set field [ Table::Date field; Get (CurrentDate) & ".." & Get (CurrentDate) - 14 ] Perform Find That may be simplifying it a bit, but it's the basics.
May 15, 200817 yr I'm afraid that won't work, but this will: Set field [ Table::Date field; Get (CurrentDate) - 14 & ".." & Get (CurrentDate) ]
May 16, 200817 yr Author Thanks. I kept getting the "Need operater here" message at semicolon. I had to change the semicolon to "&" and put a "(" and ")" at the both ends and it worked great This is what I did with my table and date field inserted: TABLE::DATE FIELD & (Get (CurrentDate) - 14 & ".." & Get (CurrentDate)) Thanks again!
May 16, 200817 yr The semicolon is a separator between the two options of the Set Field[] script step. First, you select the target field, i.e. which field you want to set (that would be TABLE::DATE FIELD). Next, you specify the calculated result - that would be ONLY THIS: Get (CurrentDate) - 14 & ".." & Get (CurrentDate) Note that you do NOT include the target field here, unless you want to keep the existing contents; for example, Set Field [ somefield ; somefield & "a" ] appends "a" to whatever is already in somefield. In your case, when you enter Find mode, the field is initially empty (no criteria specified), so the reference does not actually do anything, but it still shouldn't be there. I don't see how the extra parentheses help either. Edited May 16, 200817 yr by Guest
Create an account or sign in to comment