Boolean Arrays

Shonatina
Member Posts: 114
hi,
I have attached the requirement, how can I code it in such a way that I can select different cominations, the weeks apart and occurances from it and still get the right end date.
Am trying to use arrays with boolean, but i dont know how to pass combinations of values without hard coding the combinations like
i dont want to hard code all the possible combinations. Kindly suggest how to execute with array.
thank you in advance.
I have attached the requirement, how can I code it in such a way that I can select different cominations, the weeks apart and occurances from it and still get the right end date.
Am trying to use arrays with boolean, but i dont know how to pass combinations of values without hard coding the combinations like
if (tuesday and monday and not wed and not thur and not fri and not sat and not sun) = true then
{body condition...}
if (tuesday and monday and not wed and thur and not fri and not sat and not sun) = true then
{body condition...}
i dont want to hard code all the possible combinations. Kindly suggest how to execute with array.
thank you in advance.
smile always
shona
That which you seek inside is that which you find outside
shona
That which you seek inside is that which you find outside
0
Comments
-
Create a new table with a code primary key and boolean fields for the days of the week and store the data there. Create a drill down from your table to this one.David Singleton0
-
hi David, Thanks for replying.
As of now i thought of doing like this, im using the Date virtual table and finding the day of the week and assigning the values of each day to a array i created with dimension 7.
so array[1] = monday n so on. with that i create a loop to calculate the end dates.
How does your method works. how will i know which booleans are selected and what are they?
Thanks again.smile always
shona
That which you seek inside is that which you find outside0 -
Just create the setup manually.
the table has 8 fields
Code (code10)
Mon (boolean)
Tue (boolean)
Wed (boolean)
Thur (boolean)
Fri (boolean)
Sat (boolean)
Sun (boolean)David Singleton0 -
You can check the CalcNextRunTime function in Job Queue Dispacher codeunit.Ufuk Asci
Pargesoft0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions