Hi Community,


I am planning a timetable for departures and arrivals. I´d like to give the operator the chance to create a timetable for one itinerary with a given departure and arrival time. he also shall be able to select the weekdays the timetable is active. 

So it might be that on the itinerary Lisbon --> New York the process starts at 01:00 and ends ar 14:00 and this process is only valid on Monday until Friday. 

In the next step another operator selects this itinerary and isolate a date (from - till) and the system creates trips on this itinerary for every date which is a monday until friday... 


I guess it must be able to tell the process to only be active on a given weekday and 

to be created within a given timeframe


Does anyone have ever done something like this? 


Thanks

Tobias

Hi Tobias,


You can make logic using the built-in function -  DayOfWeek()


Regards


You can use an if statement (condition: fromDate <= toDate) to create a list of dates. While true, add fromDate to a DateList and add a day to the fromDate with addDays(). 

Then loop over this list of dates, creating an itinerary if DayOfWeek(current date) <> 6 and DayOfWeek(current date) <> 0.

HI BigSlikTobi,


Did you solve it?


Best Regards

Hi Pedro, 

actually not... 

I am pretty new in this business and not really familiar with creating loops that update lists. Do you think you can make an easy example? 

Thanks! 

Tobias 

BigSlikTobi wrote:

Hi Pedro, 

actually not... 

I am pretty new in this business and not really familiar with creating loops that update lists. Do you think you can make an easy example? 

Thanks! 

Tobias 


What is your really Question? 


Waiting your feedback!

BigSlikTobi wrote:

Hi Community,


I am planning a timetable for departures and arrivals. I´d like to give the operator the chance to create a timetable for one itinerary with a given departure and arrival time. he also shall be able to select the weekdays the timetable is active. 

So it might be that on the itinerary Lisbon --> New York the process starts at 01:00 and ends ar 14:00 and this process is only valid on Monday until Friday. 

In the next step another operator selects this itinerary and isolate a date (from - till) and the system creates trips on this itinerary for every date which is a monday until friday... 


I guess it must be able to tell the process to only be active on a given weekday and 

to be created within a given timeframe


Does anyone have ever done something like this? 


Thanks

Tobias


Hi,

Do you just want to check whether the day is weekday or not?

Is this you are looking for?

Hi, 

not really. If the planner creates a new timetable he shall be able to set weekdays on which the timetable is valid. Lets say a truck from Lisbon to Berlin goes every Monday, Wednesday and Friday. The planner shall set a timetable with starting time and leadtime and this timetable shall only be active on Monday, Wednesday and Friday. 

So lets say a truck starts in Lisbon at 8:00 a.m. and needs 18hrs to Berlin. The planner serts starting time and leadtime and than he maybe has 7 checkboxes (Mo - Fr) and he checks Monday, Wednesday and Friday. Those days are active now. 

In the next step a operator plans tours for this timetabel. Lets say he wants to create tours for February. He selects a date range 01.02.2019 - 28.02.2019 and selects the timetable Lisbon - Berlin. The System now Creates tours for every Monday, Wednesday and Friday within this date range and the operator can fill in other infos like tour number etc. 

Thats basically all. I managed that the systems creates one tour with the settings of the timetable (starting time and ending time) but I have no clue how to restrict to specific days and how to create events within a date range.


Best regars 

Tobias 

BigSlikTobi wrote:

Hi, 

not really. If the planner creates a new timetable he shall be able to set weekdays on which the timetable is valid. Lets say a truck from Lisbon to Berlin goes every Monday, Wednesday and Friday. The planner shall set a timetable with starting time and leadtime and this timetable shall only be active on Monday, Wednesday and Friday. 

So lets say a truck starts in Lisbon at 8:00 a.m. and needs 18hrs to Berlin. The planner serts starting time and leadtime and than he maybe has 7 checkboxes (Mo - Fr) and he checks Monday, Wednesday and Friday. Those days are active now. 

In the next step a operator plans tours for this timetabel. Lets say he wants to create tours for February. He selects a date range 01.02.2019 - 28.02.2019 and selects the timetable Lisbon - Berlin. The System now Creates tours for every Monday, Wednesday and Friday within this date range and the operator can fill in other infos like tour number etc. 

Thats basically all. I managed that the systems creates one tour with the settings of the timetable (starting time and ending time) but I have no clue how to restrict to specific days and how to create events within a date range.


Best regars 

Tobias 

you can use calendar widget...