Newbies Mancio Posted April 25, 2008 Newbies Posted April 25, 2008 Hi, I'm an italian developer. I try to explain my problem. I've a table with a GLOBAL STORAGE field (type date) named "Dataini" and another normal field (type date) named "Var". I want to find all the records in this table where Var = Dataini. I try to use the script function "Perform Find" but when I select the field "Dataini" I can add as criteria only a date (ex. 10/12/2008) and not the global field "Var". How can I solve it? Thanks
comment Posted April 25, 2008 Posted April 25, 2008 Perform Find[] only works with static (stored) criteria. Try it this way: Enter Find Mode [] Set Field [ YourTable::Var ; YourTable::Dataini ] Perform Find []
Newbies Mancio Posted April 25, 2008 Author Newbies Posted April 25, 2008 Many thanks for your reply. I solve this problem but I've another....I've I table with to type date field: "From" and "To" and the GLOBAL storage variable "Var". How I can find all the records where "From <= Var <= To"?? The Find Mode can only show records where Var = From or Var = To and the script function Perfom Find doesn't admit criterias with global storage...how can I solve it?!! Thanks!!!!
comment Posted April 25, 2008 Posted April 25, 2008 Just about the same: Enter Find Mode [] Set Field [ YourTable::From ; "≤" & YourTable::Var ] Set Field [ YourTable::To ; "≥" & YourTable::Var ] Perform Find [] The Find Mode can only show records where Var = From or Var = To Hopefully, it's clear now that the above statement is incorrect. You can do the same thing manually in Find mode, by using the appropriate find operators.
Newbies Mancio Posted April 25, 2008 Author Newbies Posted April 25, 2008 Thanks so much...as your skills I would like to take the opportunity to ask you something more (if it's possible!). I want to add a field in a table that show a value in depends of the value of another field. My english is not very good, I try to explain with an example. When I add a new record of this table if I set in the field Date "25/04/2008" the field "Disponibility" shows the set of value: "1-2-3"..else if I set the filed Date "30/04/2008" the field "Disponibility" shows "2-5-9". The list of value "1-2-3" and "2-5-9" are calculated dinamically. I hope you understand this complicated example..thank you so much for the attention!!
comment Posted April 25, 2008 Posted April 25, 2008 I'm afraid that's not very clear: 1. What is special about date 25/04/2008 - as opposed to 30/04/2008 (or any other date)? 2. Is "1-2-3" a SINGLE text value? You say "set" or "list" - that's not clear.
Newbies Mancio Posted April 25, 2008 Author Newbies Posted April 25, 2008 I try to be more clear. I want to manage a database for the book of room in a litte hotel. I've three table: one for the clients (name, surname, address,etc..) one for the book of room (date from, date to,nr. of rooms, client, etc..) and one for the room (number, number of beds,type of room, etc..). When I add a new book I want to have a field that shows the number of rooms free for one date. Ex. I want to add a new book for the date: 30/04/2008. When I add this date on the form I want to see on the field "number of room" a list of value with the room free for this date...Is the problem more clear now?
mr_vodka Posted April 25, 2008 Posted April 25, 2008 Hmmm strange. I just posted a sample booking file the other day. See if that helps. http://www.fmforums.com/forum/showtopic.php?tid/194820
comment Posted April 25, 2008 Posted April 25, 2008 I believe this could be a bit simpler: BookingSimple.fp7.zip
Recommended Posts
This topic is 6055 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now