LaRetta Posted January 28, 2008 Posted January 28, 2008 (edited) I have a file with external data source as: file:Company_Data fmnet:/xx.xxx.xx.xxx/Company_Data Originally I had them reversed but when I needed to design in the file and wanted to reference my local dummy copy of the program, I couldn't switch them once I had opened the file (I had to close the served version so it would find the local copy). So now I have the local version first and if I want to activate the file, I remove the Company_data file locally and when it opens, it then finds the served version. But, while I'm testing, I'm afraid it might not always grab the local version. I would like a way to display which source is being used before I begin changing the data with my tests. It makes me very nervous and I just want to be SURE! I realize I can specify a data source and even Open Manage data sources with script. Is this how I'll have to confirm which is being used? All I want is a Custom Dialog (which I click a button) to display: file:Company_data OR fmnet:/xx.xxx.xx.xxx/Company_Data ... or even the words "local files" or "served files". It's probably right in front of my face; sometimes its difficult to see up close. UPATE: Oh, I realize I can change some data and then check the date/time of the file but I don't want to find out THAT way because it would be too late; I'd be changing live data which could be bad. I just want to be SURE which source is being accessed. Maybe I can always trust that, if there is a local copy, it is being accessed but ... I don't do well with trust. LaRetta Edited January 28, 2008 by Guest Added update
tgilders Posted January 28, 2008 Posted January 28, 2008 (edited) If you have a preference file in the solution you could put "Server File" or "Local File" in a "Location" field within it. Then you could just call up a Custom Dialog to display that fields data. You could also use a Global, but you'll need to make the change in the file before hosting it on the server. (Unless you use a FileMaker Server-side script to set the global value -- those stick!) I suppose another option would be to just have a script in the file that is different from the server copy vs. the local copy. Without modifying the schema at all, just call the script to display a dialog with the text you specify in the calculation (Server or Local message). Edited January 28, 2008 by Guest
Breezer Posted January 28, 2008 Posted January 28, 2008 why not just have a global calculation using "Get (HostName)"?
LaRetta Posted January 28, 2008 Author Posted January 28, 2008 Thank you both for the suggestions!! In truth, I figured there must be a way to accomplish it without adding a field (which was my goal) and Mr. Vodka just handed it to me ... script in data file with (as Breezer suggested), Get (HostName ) in a Custom Dialog. I simply call the script (upon open) as subscript from my file. Now I have the best of both worlds ... I can feel safe when I open my file that I'm accessing the correct data file and I won't need to add an unnecessary field to do it. Much appreciated. :smile2:
Recommended Posts
This topic is 6145 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