Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About mike_eddie

  • Rank
  1. I've currently developed a database using the data separation model whereby I have an interface file, and a database file. The interface file is held locally on each computer using the database, and the database file is held on a server. There are going to be 3 - 5 different organisations all contributing data to the main database, but ordinary users should only have access to the data created by their organisation. Some "super-users" will have access to the combined data from all organisations. I currently have lots of reports which cycle through the database, analysing specific parts of the data and returning found sets. What is the best way to segregate out my data on an organisation by organisation level? Im trying to avoid having separate database files so that I don't have to make the changes to each file every time the database is updated? I thought about setting up access privileges, and storing the organisation name in every record of the database, then limiting the view, edit, delete privileges based on this field. However, upon reading through the various FMforums it looks like this would give me multiple records showing <No Access>. Im basically trying to achieve:- User 1 from Organisation A logs on - database behaves as if specific to Organisation A Same for User 2 from Organisation B Super User logs on and can run reports on data from Organisation A & B combined Can anyone suggest an elegant solution? BW, Mike
  2. Hi, Im using the Get(ActiveFieldContents) in a script which is triggered when a field is entered, and when the field is exited. However, it fails to get all of the text in a large text field if some of the text is not visible. Upon exiting the field, the script gets all the text as appropriate. I am trying to detect if the field was modified, and if so to log the old and new values. This is playing havoc with my script and I don't understand why it doesn't evaluate properly in the first instance. Any tips would be hugely appreciated. Mike
  3. Hi there, Currently I have a FM solution which has a database and an interface file, both with identical user accounts. On login, the license key which is stored in the interface file is checked against the company server to see if it is valid, and in date. It does this by comparing persistent id, a license key which is generated by filemaker using UUID, an organisation name, and expiry date. Ive realised that I may need to update the interface file, database file, or both at various points in the coming months. As I update, how do I keep the current user accounts, and not force the users to reset passwords etc. The client currently does not have any form of external authentication setup. Ive sketched out a model which I think may work, can anyone spot any problems. Ive extracted out the license key to a separate file which will live on each clients computer. That way if the interface file is updated then the license won't have to be re entered. Could i also extract out the accounts into an accounts file, and use this to add/delete/modify filemaker user accounts? What security accounts/login details would I need to use for the license file, and accounts file? I hope the diagram below will make my mental model a little clearer? BW, Mike
  4. Perfect thanks Wim. The FM easy sync option looks like it may do the trick. Do you know if it's possible to have several tiers of syncing though? For example, can an iPad sync to the clients filemaker database, hosted locally or on filemaker server, and can this then sync to the master database hosted on filemaker server, along with other clients. All sync would need to be upwards only, I wouldn't want the data to cascade down again. The ipad will be used for data entry of new records only, and once synced these records should be deleted from the file.
  5. Hi, I have filemaker solution which I am converting to use the data separation model with a data file, and user interface file. This will be deployed to a number of clients at different sites. However, as this database will be used for research and audit, it is foreseeable to at some point we will want to access data from all of the organisations, and run reports etc. My question is, what is the simplest and most effective way of doing this: 1. Do I use one data file only, and get all of the organisations to add to this? or 2. Do I have multiple client data files and then try and combine these later on. Is there a way that filemaker can access multiple data files simultaneously. Thanks in advance. BW, Mike
  6. Thanks guys. Finally found the main problem. Java treats N and n as different variables, whereas filemaker treats $n and $N as the same variable, so things were getting over written. There is now a small difference between the two, plotting on opposite sides of main roads etc which I think is due to the OSGB36 vs WGS84 problem as you suggest. Once Ive written the script to convert these Ill add the code here for anyone looking in future! Thanks again for your help! BW, Mike
  7. Thanks for the reply! I think there may be something wrong with the maths somewhere. I had entered a coordinate for north devon, and it was plotting me somewhere in the english channel. Not that far away in the grand scheme of things. However I tried a couple more coordinates up in scotland and the position only moves slightly. I just can't figure out what is going wrong! Could it be to do with the number of times the loop is being performed? All the other maths seems correct?
  8. I am writing an application where I want to plot a UK grid ref on a google map. To do this I need to convert from the grid ref to lat/long, and then display this using the google maps API in a web viewer. I have found the following javascript http://www.movable-type.co.uk/scripts/latlong-gridref.html which appears to do the trick. Particulaurly, this part of the code: /** * Converts Ordnance Survey grid reference easting/northing coordinate to (OSGB36) latitude/longitude * * @param {OsGridRef} gridref - Easting/northing to be converted to latitude/longitude. * @returns {LatLonE} Latitude/longitude (in OSGB36) of supplied grid reference. * * @example * var grid = new OsGridRef(651409, 313177); * var p = OsGridRef.osGridToLatLon(grid); // p.toString(): 52°39′27″N, 001°43′04″E */ OsGridRef.osGridToLatLon = function(gridref) { var E = gridref.easting + 0.5; // easting of centre of 1m grid square var N = gridref.northing + 0.5; // northing of centre of 1m grid square var a = 6377563.396, b = 6356256.909; // Airy 1830 major & minor semi-axes var F0 = 0.9996012717; // NatGrid scale factor on central meridian var φ0 = 49*Math.PI/180, λ0 = -2*Math.PI/180; // NatGrid true origin var N0 = -100000, E0 = 400000; // northing & easting of true origin, metres var e2 = 1 - (b*b)/(a*a); // eccentricity squared var n = (a-b)/(a+, n2 = n*n, n3 = n*n*n; // n, n², n³ var φ=φ0, M=0; do { φ = (N-N0-M)/(a*F0) + φ; var Ma = (1 + n + (5/4)*n2 + (5/4)*n3) * (φ-φ0); var Mb = (3*n + 3*n*n + (21/8)*n3) * Math.sin(φ-φ0) * Math.cos(φ+φ0); var Mc = ((15/8)*n2 + (15/8)*n3) * Math.sin(2*(φ-φ0)) * Math.cos(2*(φ+φ0)); var Md = (35/24)*n3 * Math.sin(3*(φ-φ0)) * Math.cos(3*(φ+φ0)); M = b * F0 * (Ma - Mb + Mc - Md); // meridional arc } while (N-N0-M >= 0.00001); // ie until < 0.01mm var cosφ = Math.cos(φ), sinφ = Math.sin(φ); var ν = a*F0/Math.sqrt(1-e2*sinφ*sinφ); // nu = transverse radius of curvature var ρ = a*F0*(1-e2)/Math.pow(1-e2*sinφ*sinφ, 1.5); // rho = meridional radius of curvature var η2 = ν/ρ-1; // eta = ? var tanφ = Math.tan(φ); var tan2φ = tanφ*tanφ, tan4φ = tan2φ*tan2φ, tan6φ = tan4φ*tan2φ; var secφ = 1/cosφ; var ν3 = ν*ν*ν, ν5 = ν3*ν*ν, ν7 = ν5*ν*ν; var VII = tanφ/(2*ρ*ν); var VIII = tanφ/(24*ρ*ν3)*(5+3*tan2φ+η2-9*tan2φ*η2); var IX = tanφ/(720*ρ*ν5)*(61+90*tan2φ+45*tan4φ); var X = secφ/ν; var XI = secφ/(6*ν3)*(ν/ρ+2*tan2φ); var XII = secφ/(120*ν5)*(5+28*tan2φ+24*tan4φ); var XIIA = secφ/(5040*ν7)*(61+662*tan2φ+1320*tan4φ+720*tan6φ); var dE = (E-E0), dE2 = dE*dE, dE3 = dE2*dE, dE4 = dE2*dE2, dE5 = dE3*dE2, dE6 = dE4*dE2, dE7 = dE5*dE2; φ = φ - VII*dE2 + VIII*dE4 - IX*dE6; var λ = λ0 + X*dE - XI*dE3 + XII*dE5 - XIIA*dE7; return new LatLonE(φ.toDegrees(), λ.toDegrees(), LatLonE.datum.OSGB36); }; Ive tried to recreate the above logic in a script in Filemaker. I seem to be getting an answer which is nearly correct, but not quite. Ive checked and double checked my version of this and I cannot see any errors. Could this be a rounding issue, or perhaps Im missing something obvious! Convert OS Grid Ref to Lat Lon Set Variable [ $E; Value:Temp::gE + .5 ] Set Variable [ $N; Value:Temp::gN + .5 ] Set Variable [ $a; Value:6377563.396 ] Set Variable [ $b; Value:6356256.909 ] Set Variable [ $F0; Value:.9996012717 ] Set Variable [ $phi0; Value:49*Pi/180 ] Set Variable [ $delta0; Value:-2*Pi/180 ] Set Variable [ $N0; Value:-100000 ] Set Variable [ $E0; Value:400000 ] Set Variable [ $e2; Value:1 - ($b*$b)/($a*$a) ] Set Variable [ $n; Value:($a-$b)/($a+$ ] Set Variable [ $n2; Value:$n*$n ] Set Variable [ $n3; Value:$n*$n*$n ] Set Variable [ $phi; Value:$phi0 ] Set Variable [ $M; Value:0 ] Loop Set Variable [ $phi; Value:($N-$N0-$M)/($a*$F0) + $phi ] Set Variable [ $Ma; Value:(1 + $n + (5/4)*$n2 + (5/4)*$n3) * ($phi-$phi0) ] Set Variable [ $Mb; Value:(3*$n + 3*$n*$n + (21/8)*$n3) * Sin ( $phi-$phi0 ) * Cos($phi+$phi0) ] Set Variable [ $Mc; Value:((15/8)*$n2 + (15/8)*$n3) * Sin(2*($phi-$phi0)) * Cos(2*($phi+$phi0)) ] Set Variable [ $Md; Value:(35/24)*$n3 * Sin(3*($phi-$phi0)) * Cos(3*($phi+$phi0)) ] Set Variable [ $M; Value:$b * $F0 * ($Ma - $Mb + $Mc - $Md) ] Exit Loop If [ $N-$N0-$M >= .00001 ] End Loop Set Variable [ $cos_phi; Value:Cos($phi) ] Set Variable [ $sin_phi; Value:Sin($phi) ] Set Variable [ $v; Value:$a*$F0/Sqrt(1-$e2*$sin_phi*$sin_phi) ] Set Variable [ $rho; Value:$a*$F0*(1-$e2)/((1-$e2*$sin_phi*$sin_phi)^1.5) ] Set Variable [ $eta2; Value:$v/$rho-1 ] Set Variable [ $tan_phi; Value:Tan($phi) ] Set Variable [ $tan2phi; Value:$tan_phi * $tan_phi ] Set Variable [ $tan4phi; Value:$tan2phi * $tan2phi ] Set Variable [ $tan6phi; Value:$tan4phi * $tan2phi ] Set Variable [ $sec_phi; Value:1 / $cos_phi ] Set Variable [ $v3; Value:$v * $v * $v ] Set Variable [ $v5; Value:$v3 * $v * $v ] Set Variable [ $v7; Value:$v5 * $v * $v ] Set Variable [ $VII; Value:$tan_phi / (2*$rho*$v) ] Set Variable [ $VIII; Value:$tan_phi/(24*$rho*$v3)*(5+3*$tan2phi+$eta2-9*$tan2phi*$eta2) ] Set Variable [ $IX; Value:$tan_phi/(720*$rho*$v5)*(61+90*$tan2phi+45*$tan4phi) ] Set Variable [ $X; Value:$sec_phi/$v ] Set Variable [ $XI; Value:$sec_phi/(6*$v3)*($v/$rho+2*$tan2phi) ] Set Variable [ $XII; Value:$sec_phi/(120*$v5)*(5+28*$tan2phi+24*$tan4phi) ] Set Variable [ $XIIA; Value:$sec_phi/(5040*$v7)*(61+662*$tan2phi+1320*$tan4phi+720*$tan6phi) ] Set Variable [ $dE; Value:($E-$E0) ] Set Variable [ $dE2; Value:$dE*$dE ] Set Variable [ $dE3; Value:$dE2 * $dE ] Set Variable [ $dE4; Value:$dE2 * $dE2 ] Set Variable [ $dE5; Value:$dE2 * $dE3 ] Set Variable [ $dE6; Value:$dE4 * $dE2 ] Set Variable [ $dE7; Value:$dE5 * $dE2 ] Set Variable [ $phi; Value:$phi - $VII*$dE2 + $VIII*$dE4 - $IX*$dE6 ] Set Field [ Incident::Latitude; Degrees($phi) ] Set Field [ Incident::Longitude; Degrees($delta) ]  Alternatively, is there a way to run the original javascript file, pass in my grid ref from the database, convert to lat/long, save this on the record, and then use the google maps API to plot this accordingly. Any pointers would be hugely appreciated! Mike
  • Create New...

Important Information

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