Mike CPB Posted December 18, 2008 Posted December 18, 2008 In my renewal process I track when clients renew to best decide next year when to atempt the same renewal. This field is based on a range of dates. From November to Dec 15 / Dec 16 - Jan 15 / Jan 16 - Feb 15 / Feb 16 - Mar 15 I've been using get(currentdate) but I'm not sure how to search a range in a script. 1/1/2009...1/2/2009 (example) doesn't work like in a find. Maybe this has to be done in steps. Any help would be greatly appreciated. Regards, Mike.
Søren Dyhr Posted December 18, 2008 Posted December 18, 2008 You would need this to be different in the presentation layer than in the actual stored value, or even the start date field and a calc'field holding the expiration date. The span could then be written via a train of merge fields and a dash. Then would range searches in either of the fields happen correct. --sd datespan.zip
Mike CPB Posted December 19, 2008 Author Posted December 19, 2008 I re-thought what it was that I'm trying to achieve. I settled for the current month of the actual day. It's not the range I had before. MonthName (Get(CurrentDate)) I'm not sure if what I was describing was what you provided a solution to... If it is than I'm not sure how to implement your suggestion. : Regards, Mike.
comment Posted December 19, 2008 Posted December 19, 2008 This is rather confusing. Do you mean you want to find customers whose renewal date is within the current month, or something else? This part in particular is not clear: This field is based on a range of dates. From November to Dec 15 / Dec 16 - Jan 15 / Jan 16 - Feb 15 / Feb 16 - Mar 15
Mike CPB Posted December 19, 2008 Author Posted December 19, 2008 During data entry I wanted to evaluate a field ( renewal tracking ) with a script. If it the current date was between specific date range then it would = group 1 for instance. For now it will leave renewal month which is my current compromise. I do believe his solution was to search records and that wasn't the problem. Sorry for not spelling out my problem more clearly. Regards Mike.
IdealData Posted December 19, 2008 Posted December 19, 2008 When you perform a find you are actually entering TEXT so your range must be evaluated as follows: GetAsText (START_DATE) & "..." & GetAsText (END_DATE)
comment Posted December 19, 2008 Posted December 19, 2008 I am sorry, but that is still too cryptic for me. By now, I am not even sure if you want a script or just a calculation field. Could you spell out your requirement step-by-step, preferably in non-technical terms?
comment Posted December 19, 2008 Posted December 19, 2008 Actually, when you use the & operator, the operands are converted to text implicitly, so: START_DATE & ".." & END_DATE is quite sufficient.
IdealData Posted December 19, 2008 Posted December 19, 2008 I never realised that - but of course it makes sense as the "&" is for TEXT concatenation.
Mike CPB Posted December 20, 2008 Author Posted December 20, 2008 START_DATE & ".." & END_DATE Is exactly what was needed. I didn't even think to separate ... with &" "& Thanks for solving this unique problem. I'm not too sure if or how I could have presented the problem more clearly. My first post shows that I was attempting the script without &"..."& Perhaps my wording may have confused. I understand that the search date range is obviously something more common that people are trying to achieve, but this wasn't the case. But alas the solution was found, my thanks. Regards, Mike.
Recommended Posts
This topic is 5877 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now