Author Topic: Between Floating Date Values  (Read 8434 times)

CMODWiz

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Between Floating Date Values
« on: September 19, 2014, 07:27:03 AM »
Hello,

I have a Searchable field that is Required.  This is defined in the Administrative Client for a Folder definition.

The field is searchable Between a pair of Minimum and Maximum dates.

I want the Minimum and Maximum dates to "float", i.e as time marches forward, the Minimum and Maximum dates should be incremented automatically.  I do not wan to hard-code these dates.

How can I symbolically code the Minimum and Maximum dates in a Required range so that Between always uses the latest pair of floating dates as the Default?

Thanks.

Paul M.


jeffs42885

  • Guest
Re: Between Floating Date Values
« Reply #1 on: September 19, 2014, 08:47:45 AM »
Folder options-Field Information

Under "Interval"

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2229
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Between Floating Date Values
« Reply #2 on: September 19, 2014, 12:39:03 PM »
Does 'last three months' or something similar not work?

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

CMODWiz

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Between Floating Date Values
« Reply #3 on: September 23, 2014, 06:05:26 AM »
Thanks for trying.

Let's try again.

I need a floating Minimum date value, AND a floating Maximum date value.

That is, I want to go back 10 years and go forward 10 years as my default Between Range for this Field.

I do not want to hardcode these dates because I would constantly have to go back and update them.

In the Interval box, I can  choose either Last or Next radio buttons, but not both.  These values will be for the Defaults Format.   I need Both the Last 10 Years, as well as the Next 10 years, for the same Field, for use during Search.

I believe I must put a floating value in the Minimum Value box and in the Maximum Value box.  These boxes appear beneath the Defaults box, and above the Defaults Format / Interval boxes.

How do I represent these floating values as Defaults ? 

E.g., %Y-10-%m-%d for the Minimum Value (trying to represent current year minus ten to get 10 years ago), and %Y+10-%m-%d for the Maximum Value default (trying to represent current year plus ten to get 10 years in the future). 

Will that work?

Or, do I leave Minimum Value empty and Maximum Value empty, relying entirely on the Interval box???

Let me know.  Thanks.

Frederick Tybalt

  • Full Member
  • ***
  • Posts: 124
    • View Profile
    • Personal Website
Re: Between Floating Date Values
« Reply #4 on: September 24, 2014, 12:30:51 AM »
I understand that you requirement is if today is 24 Sep 2014 the default values that should be populated is 24 Sep 2004 and 24 Sep 2024. I guess this would not be possible

Minimum and Maximum values indicates the user can only enter the values between the min and max values.

If you need to use Default 1 and 2 value field, either both need to be hardcoded or  value 1 needs to be hardcoded and the deviation can be provided in the interval. Using default value in the format "%Y-10-%m-%d " is not supported.
rIcK
======------------------======
www.rick.co.in | www.tekbytz.com

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1200
    • View Profile
Re: Between Floating Date Values
« Reply #5 on: September 24, 2014, 10:26:39 AM »
Outside my area of expertise but could one be lucky enough to be able to enter 't-3650' for minus 10 years and 't+3650' for plus ten years?

Ed
#zOS #ODF

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: Between Floating Date Values
« Reply #6 on: September 24, 2014, 11:37:03 AM »
Had to do something similar once.  The nearest thing I could come up with was to map a second folder field to the same date field.
Date1 ->  Index_Date
Date2 ->  Index_Date

Set Date1 for between Interval of Last 10 years.  Set Date2 for between Interval of Next 10 Years.

The only annoying thing about this was you had to manually select the logical OR every time you reopened the folder.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2229
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Between Floating Date Values
« Reply #7 on: September 25, 2014, 04:20:28 AM »
Frederick has the right idea by using the 't' operator to substitute the current date, and expressing the range in number of days...  But sure how to get the range though.  Is the default operator for the date field set to 'between'?

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

CMODWiz

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Between Floating Date Values
« Reply #8 on: September 30, 2014, 12:55:49 PM »
Hi Frederick, and all respondents,

No, the default is not set to Between, it is set to Equals.  However, Between can be chosen.

This makes it even harder to set the default symbolically, I guess.

Perhaps the true solution is:  Write an Exit. Then you can do exactly what you need to do.

However, I may experiment with t-3650 and t+3650, as well.

Is there a manual that describes these symbolic time entries?  Or must I get everything out of the F1 Help key?

Paul M.

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Between Floating Date Values
« Reply #9 on: March 19, 2015, 08:56:31 AM »
at my knowledge, the only way if to write your own cmod client with ODWEK Java API..., write a plugin for ICN (if you want to use ICN) or request an enhancement of the windows client...
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML