M
MattCrawford
I have a slightly difficult situation here. I'm fine at creating
systems for databases and designing tables etc. But I need to build a
way to do a complicated task.
I have a table of servers and racks. In the table of servers I define
what device type it is by a number relating to another table that
defines what that number means. That sub table defines the height of
the server in units, mostly 1-15 units. In the server table I also
state what the starting unit on the rack is.
Each of the racks has 42 availible units. I have a form that adds a
new server, and I need it to have a drop down box of availible units
based on the server size sub form. So the form has to grab data from
the server table, then reference the server type table for the height,
compare to the racks table and display only starting units that would
hold the full server size. For example:
Server1 is type 2 and starts on unit 42 (the bottom), of rack 400.
Type 2 (sub form) says the height is 3 units.
I go to add server2 and from my form I go to select the rack 400 from a
dropdown of racks availible. Then I want a 2nd drop down that quieries
for the starting point and height. So starting at 42, and subtract the
height is 39. So 39-42 are taken. So it would not show 39, 40, 41, or
42.
The problem is they are not all filled from the bottom up and are
randomly placed with mixed intervals in each rack. My first idea was
to add colums in the racks table for each unit number that would be
simple yes or no check boxes to see if that unit was taken. But then I
could'nt figure out how to display only availible based on the height.
I assume the quasi math is this:
Get availible units from racks table,
get new system height from server table, then sub form of device type,
now I need a way to list only sets of the availible height.
For example, if the height is 3, only list a starting point unit that
has at least 3 more open spots around it. But a table cant hold that
kind of numerical data, just off and ons with the check box..
BLLAARRRGGGHHHHHHH I neeeeeed heeeeeellllpppp. Please? Thanks in
advance.
systems for databases and designing tables etc. But I need to build a
way to do a complicated task.
I have a table of servers and racks. In the table of servers I define
what device type it is by a number relating to another table that
defines what that number means. That sub table defines the height of
the server in units, mostly 1-15 units. In the server table I also
state what the starting unit on the rack is.
Each of the racks has 42 availible units. I have a form that adds a
new server, and I need it to have a drop down box of availible units
based on the server size sub form. So the form has to grab data from
the server table, then reference the server type table for the height,
compare to the racks table and display only starting units that would
hold the full server size. For example:
Server1 is type 2 and starts on unit 42 (the bottom), of rack 400.
Type 2 (sub form) says the height is 3 units.
I go to add server2 and from my form I go to select the rack 400 from a
dropdown of racks availible. Then I want a 2nd drop down that quieries
for the starting point and height. So starting at 42, and subtract the
height is 39. So 39-42 are taken. So it would not show 39, 40, 41, or
42.
The problem is they are not all filled from the bottom up and are
randomly placed with mixed intervals in each rack. My first idea was
to add colums in the racks table for each unit number that would be
simple yes or no check boxes to see if that unit was taken. But then I
could'nt figure out how to display only availible based on the height.
I assume the quasi math is this:
Get availible units from racks table,
get new system height from server table, then sub form of device type,
now I need a way to list only sets of the availible height.
For example, if the height is 3, only list a starting point unit that
has at least 3 more open spots around it. But a table cant hold that
kind of numerical data, just off and ons with the check box..
BLLAARRRGGGHHHHHHH I neeeeeed heeeeeellllpppp. Please? Thanks in
advance.