in plain FileMaker, you can only run SELECTs. I know however that some Plugins implement DELETEs and UPDATEs, can't remember the names.
You can if setup ODBC sharing on the file.
Execute SQL [ DSN ; "INSERT INTO \"Loan\" (\"IDField\") VALUES(" & $ID & ")" ]
DELETE FROM "\Loan\" WHERE \"IDField\" = " & $ID
If your ID is not number, need single quote.
FMP/S is used as a SQL source and accessed with another app that can send it the statement
FM has a plug-in that can issue a SQL statement that perform these
the account issuing either of these has the permission to perform these
Consider instead using PSOS - Perform script on server.
It is similar in a sense, to using SQL. That is, you issue the command, the result happens, and you did not need to do anything on the user's layout.
With a plugin that supports SQL (Base Elements, SQLRunner for example) you can use the standard SQL syntax to insert or delete a record.
"DELETE FROM table WHERE condition" Just construct the query to use that id like so (free handed)
"DELETE FROM Loan WHERE IDField = " & $ID (if the IDField is numeric) otherwise you need single quotes around the $ID like so
"DELETE FROM Loan WHERE IDField = '" & $ID & "' "
Filemaker forums once again won't let me log in uggh! I will reply by email
The issue I am trying to solve is this…
I have 3 tables, 1 is related to 2 which is related to 3
Layout 1 based on table 1 which has a popover with a portal showing records from Table 2. When a specific change is made to records in the portal (from table 2) I want to create or delete a related record in table 3.
I could do this is I could have a portal within a portal, but that doesn't work
I could do this with ExecuteSQL, buy that is not a native option
I could do this with a script that changes the layouts then brings me back, but that looks terrible
So is there a way to do this that is elegant and looks like nothing happened
Windows 8.1 platform
Any feedback is always appreciated!
Thank you Bruce, I'm on Server 12, so that is not a option for now
Well if you don't want to do the SQL approach, I would suggest looking into the SELECTOR / CONNECTOR model by Todd Geist and the gang.
Table 1 would be the Layout table.
Table 2 in the portal (in popup like you have now)
Then when the user does his thing. Set the selector fields to select/create/delete the portal 3. This portal can be off screen and just needs an object name... so you can use the goto object, goto portal row (last) to delete or create.