By John Link
I'd like to be able to export a text file that would contain several fields from a single record, with each field on a separate line. Here's an example: John Q Public
111 West First Street
New York, NY 10001
How might I do that? I know how to export csv or Excel files, but they don't satisfy my need.
To try to explain the setup as succinctly as possible:
Database is running on a FM17 Server (on a Windows virtual(?) machine... Our IT department handles that part).
The FM database does a number of imports every morning from our primary (4D) database, using an ODBC driver, but I have not found a way to have those imports run successfully from the server, so I have them running on an instance on a secondary user account on my desktop computer.
The scripts are triggered by adding a record to a table, which is checked every five minutes using an OnTimer script. I run a separate instance of FM17 on my user account so that I can use the database even if there is an import running.
This solution has been working (fairly) well for a number of years, but last week, my desktop computer was updated to Mojave (10.14.6), and since that upgrade, it seems that the imports on the secondary account will only run while that user account is active.
1) Is anyone else doing anything similar, where they have an instance of FM running on a separate user account?
2) If so, have you had any trouble with Mojave, or have suggestions on what may be going on?
3) Any suggestions on how to fix this? My initial thought is to just open the database using FMP on the Server system and try having the imports run from there, but am concerned that might also have problems.
Any suggestions would be greatly appreciated.
I have a field called Price. I need to create another field called calculated price that will add a percentage depending on the value of the original Price field.
If the Price is $100.00 or more Subtract 10% from the price
If the price is $10.00 or less Subtract .25%
If the Price is between $10 and $50.00 Subtract .5%
If the Price is between $50 and %100.00 Subtract .75%
and so on and so on...
So if I have a record with a Price of $1.00 the calculation will fill in the Calculated Price field with $.75
I have searched the forum and internet and not found an answer to my delima.
I have a solution with a scripted import of a csv file. I do not want import dialog (e.g. mapping), so I have it set to no. I don't know the name of the file, only that it is a csv file. If I leave the filename out of the import dialogue, the default SHOW filetype in the open file dialog is for a filemaker database. The user needs education to change the SHOW to csv or all. That is undesirable. If I import a correct file once, the next time the script runs in that session, it prompts for a csv file, but if I quit the application and run it again, it goes back to SHOWing filemaker databases. If I provide a bogus file, e.g. YourFile.csv -- I have to capture errors or I get no file dialog for them to find their file. If they cancel, they get a filemaker dialog I don't control that tells them the user aborted the import, continue or cancel. If they cancel, the script exits and I don't get control. That, too, is undesirable.
What is the best practice for scripted imports so that whether the user complies or cancels, I maintain control of what happens next?
I have a layout calculation that looks like:
Round(If($$NoGPABump = 1;Classes::GPANoBump; Classes::GPABumped);2)
In most instances, this rounds the appropriate value to 2 decimals and displays those two digits. But on occasion, it displays only one decimal as in this one:
. Instead I want to see 4.20. If I round to, say, 4 decimals, it works properly: . Rounding to 3 digits gives 4.199. How do I get the trailing zero to show up? This seems to be consistent for all data that rounds to a last digit of zero. Is this a bug? Is there a workaround? Thanks,
Who Viewed the Topic1 member has viewed this topic:laguna92651