Calculating A Date Using A Dropdown List
Hello
I am not sure if this is possible or not
We have some products which we send out as samples
Now these samples have a date they are tested and another date on which they need to be retested
I have created two text field and have the first one on the current date
The second one can be offsetted using the bartender date offset option
But thats fixed
What i need is have a dropdown box in the prompt window
Which prompts the user to select the time frame of the retest.
3 Months, 6 Months, 9 Months or 12 Months
Depending on the selection the second field ato populates by adding 3 months from the system date and so on
Can someone please show me how i can do this
Thanks in advance
I am not sure if this is possible or not
We have some products which we send out as samples
Now these samples have a date they are tested and another date on which they need to be retested
I have created two text field and have the first one on the current date
The second one can be offsetted using the bartender date offset option
But thats fixed
What i need is have a dropdown box in the prompt window
Which prompts the user to select the time frame of the retest.
3 Months, 6 Months, 9 Months or 12 Months
Depending on the selection the second field ato populates by adding 3 months from the system date and so on
Can someone please show me how i can do this
Thanks in advance
0
-
Hello
I am not sure if this is possible or not
We have some products which we send out as samples
Now these samples have a date they are tested and another date on which they need to be retested
I have created two text field and have the first one on the current date
The second one can be offsetted using the bartender date offset option
But thats fixed
What i need is have a dropdown box in the prompt window
Which prompts the user to select the time frame of the retest in no of months From 1 to 12 months.
Depending on the selection the second field auto populates by adding 3 months from the system date and so on
Can someone please show me how i can do this
I have attached the .btw file
Thanks in advance0 -
Shotaro Ito
★ BarTender Hero ★
[quote name='RahulF' timestamp='1336634549' post='2375']
Hello
I am not sure if this is possible or not
We have some products which we send out as samples
Now these samples have a date they are tested and another date on which they need to be retested
I have created two text field and have the first one on the current date
The second one can be offsetted using the bartender date offset option
But thats fixed
What i need is have a dropdown box in the prompt window
Which prompts the user to select the time frame of the retest in no of months From 1 to 12 months.
Depending on the selection the second field auto populates by adding 3 months from the system date and so on
Can someone please show me how i can do this
I have attached the .btw file
Thanks in advance
[/quote]
Hi RafulF,
when datasouce has offset value, you can use More Option(Transform) > OnProcessData Event to create a date with offset.
DateAdd function would help.
[code]
'create offset date from current value'
oDate = DateAdd("m", Value, Date)
'format date'
oMonth = Month(oDate)
if oMonth < 10 Then oMonth = "0" & oMonth
oDay = Day(oDate)
if oDay < 10 Then oDay = "0" & oDay
Value = oDay & "." & oMonth & "." & Year(oDate)
[/code]
see attached document.0 -
Hi Shotaro
Thanks for your help
It is exactly what i wanted to do
i've done it exactly like you have said
But for some reason the date don't change on my label
Can you have a look at my .btw file and advise me when i am going wrong
I am using your code as it without any changes
and i can't get it to work and i don't know why
0 -
Shotaro Ito
★ BarTender Hero ★
Your format working fine here - Is there any error shown? How about when print preview? Did my sample posted worked in your environment? 0 -
Its working now
Thanks for your help Shotaro - Your a legend
0
Please sign in to leave a comment.
Comments
5 comments