Jump to content

keshalyi

Members
  • Content Count

    162
  • Joined

  • Last visited

Community Reputation

0 Neutral

About keshalyi

  • Rank
    member
  1. Well, there are a lot of things that COULD be going on... I think you'll need to narrow this down with a bit of debugging! First off, you need to figure out where your lack of data is coming from. The easiest way, I've found, is to put a display dialog command in the script, displaying the value of, in this case, imageColor. I'd put one right after you first mine the first database for a value, to start, and see if it equals anything. If not, then yu need to focus on getting data out of the old database. Start with that, and just move the dialog later in the script, to trace what happens to the value as it goes. Once you have a better idea of where you're losing your data, you'll have a better idea of how to permanently fix the leak. BTW - I don't really get EXACTLY what you're trying to do, but I think you're probably working too hard, all this work cuold be done more quickly and efficiently, I think with a scriptmaker script, from the looks of it....
  2. Hi all! I'm looking for a way to import an actual image into Filemaker with an applescript, NOT just a reference. The problem is, I need to store a preview of an image and a path to an image, and I need a simple way for my users to add pictures, from a mac, BUT, I need them to be able to see the same pictures on a PC, and they have to be stored in a volume that maps differently on the Macs then the PC's. It won't be LOTS of pictures, so I have no problem with storuing the image inside FMPro, and I have an applescript that works great, if I want to import a reference, but I just want to import the file itself! And, no, my company will not pay for Troi File. I already had to wheedle my way into Troi Dialog
  3. Is there a way to have an applescript return the path where it is saved? That is, if I put an applescript in My HD:Folder1:Folder2:Applescript, I want to be able to divine its location. What I'm trying to do, is have the applescript open another file, using a location relative to its own location. So, in the above example, the applescript would need to read data out of a text file at My HD:Folder1:Folder3:textfile.txt. But, I don't want to hardcode the hard location, just the location relative to the applescript, so taht I can move it if neccesary.
  4. Oh, yes, you're working way too hard making big repeating fields... WAY too hard. Now I don't know the exact structure of your database, but Here goes one solution, if its structure the way I think it is. I imagine the reservations database holds records that contain a start date and an end date for each reservation, and the bungalow that your guest is staying at. If so, here's an easy way to do what you want. Make two global fields in your parent database, one Called GLOBALCheckAvailable_StartDate, and one called GLOBALCheckAvailable_EndDate. Now, make a calc field CALCCheckAvailable_DoesOverlap as follows: ReservationStartDate < GLOBALCheckAvailable_EndDate and ReservationEndDate > GLOBALCheckAvailable_StartDate. This will return 1, if the reservation overlaps the range set by your global fields, and 0 if it does not. Now, go back to Bungalows, and set up a relationship from Bungalow to BungalowReserved, called Reservations. This will give you every reservation in the Bungalow. Sort this relationship by CALCCheckAvailable_DoesOverlap, in descending order. This way, if any of the reservations overlap, they'll come to the top of the relationship. Now set up a calc CALCCheckAvailable_isavailable, as follows: if(Reservations:CALCCheckAvailable_DoesOverlap, 0, 1). This returns a 1 if the bungalow is available during the dates above. Now, set up a global container field called GLOBALHighlight (we're still in bungalows, btw), and paste into it, simply, a filled box of a color that you want to highlight good bungalows with. Then, set a Calc field CALCCheckAvailable_HighlightifAvailable as if(CALCCheckAvailable_isavailable, GLOBALHighlight, ""). Almost done! Now, go back to the reservations table, set up a universal relationship to Bungalows, and sort it by CALCCheckAvailable_isavailable in descending order. Now, you can build the interface to check which bungalows are available. Just but down our two global fields, for them to enter a start and end date to check, then make a portal to AllBungalows. Now, if you put in the background of each portal row the CALCCheckAvailable_HighlightifAvailable field, and then set your bungalow name or whatever on top of it, you will end up with a dynamic portal, that lists the available bungalows first, highlighted. Make sense?
  5. You could also do a verification that checks to make sure the data is unique. ITs a simple checkbox. Then, it'll just yell at you if you enter a non-unique code.
  6. WEll... ugh. That's all I can say, I know exactly what you're saying, but, there is no way to make the target of the relationship dynamic, that I know of anyway. Now, that said... You have two options. One, since chances are you won't need to know your heart rate at 13:55:05, specifically, etc, you could just, every day, have the database compile the iportant data (standard deviation, average, median, whatever) and export thos to a database of days, then empty out your sampling data. The other option, might be to script the data extraction, somehow. Like, if you give them standard filenames (say, the file for Feb 14, 2003 is called 02142003.fp5), then you could make a calculation that returns the filename, and feed that out to an applescript that could retrieve information from the remote file?
  7. WEll... well blast it! That's what I thought to, but yesterday it was giving me 1 as the result. So I opened my file today, just to make sure that I had everything defined correctly, and the bloomin thing is equaling 0, like it should! No, not in fields, just to test the behaviour, I made a field that was: "PV" = "DC" and it returned 1 yesterday! I know, because I banged at the *%#$%$#&*#$%#$% thing for an hour! Anyway, all better now, for no reason. Just a weird bug I guess... that bugs me...
  8. Sure... set up a relationship to the other database. Then in the script, you'll have to do four things: 1. Set some local global field to the related value that you want to search for 2. Enter find mode 3. Set the value you want to search in tho the global field, above, 4. Perofrm find
  9. Well, I'm shooting in the dark, without seeing the file, but if its showing up in hosts, It must be open on the host computer as well. Thus, do you have the file set to multi-user?
  10. *smile* now that my logic has calmed down... very well. Then how would one go about testing the equality of two strings? By your same logic (and by my testing) "PV" = "DC" (an example that I want to be false). Now, let me say, one thing that truly boggles me is, that the result of if("PV" = "DC", 1, 0) returns 0, while "PV" = "DC" returns 1. This seems strange to me. So, everytime I want to test string equality, do I have to put it in an if statement? Why? I don't understand how the if-nest changes the result of "PV" = "DC".
  11. OK... so I've entered the twilight zone. Here's my field: "1" = "2" Here's my result: 1 What?:? No it doesn't! "1" does NOT equal "2"!!! For some reason, my computer has gone bonzers, and it is matching strings by length, not by contents. I can't figure out why, and it is driving me bonkers. What coudl possibly be causing this problem???
  12. Thanks, guys, that worked great! I'll put that little fix in the ol' toolbox, right away...
  13. Raxumovsky, thank you, that is the best idea I've heard in ages, took me a minute to wrap my little brain around it, but I like it, I do, I do! I'll try it and let you know how it works. Thanks, ugo, for all your help, too, I've gotten it working with the method you first suggested, but I'm nervous to leave it that way, because I know, I'll add a script someday that adds or subtracts dates, and forget to insert the lookup . Laretta, thanks, s'much for the encouragement. I'm in that 'finishing' phase, and now suddenly everybody wants me to instrumentally redesign the database. Grr!!!!
  14. Well... I was trying to get around the lookup idea, I do appreciate your input, but the list of pubs is VERY dynamic, changing continuously, and I'd basically have to do a lookup every time - believe me that's a LOT of lookups. I guess t hat's what I'll have to do though... sigh. Thanks.
  15. Wow,those colors had personality . And they work fine on my system. In all honesty, I think the problem here lies in the calculation that determines the field not updating, not in the field not being visible. But what do I know?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.