AnsweredAssumed Answered

Stuck on ExecuteSQL

Question asked by ChrisJohnston on Jan 9, 2014
Latest reply on Jan 9, 2014 by philmodjunk

Title

Stuck on ExecuteSQL

Post

Go to related records can work through a indirect relationship I am seeing this is powerful. In my solution I have

INFORMATION -------<PROGRESS>------DOCUMENTS

Go to related records will give me the related records or course from PROGRESS but also the ones from documents. The equivalent to ExecuteSQL to Go to related records from PROGRESS when INFORMATION::pk = PROGRESS::fk would be this

ExecuteSQL (
"SELECT \"fk\" FROM \"PROGRESS\"
   WHERE \"fk\" = ?";
"";
"";
INFORMATION::pk
)

I also have PROGRESS::id = DOCUMENTS::pk, but can ExecuteSQL from the context of INFORMATION go through the PROGRESS table to grab the DOCUMENTS like the script step can? Does anyone have an example of this? JOINS don't seem the same in FileMakers SQL and that is fine I am just wondering can it even be done? I was thiking something like this but.....

ExecuteSQL (
"SELECT \"pk\" FROM \"DOCUMENTS\"
   JOIN PROGRESS ON INFORMATION.\"pk\" = ?";
"";
"";
PROGRESS::fk
)

Outcomes