Just wanted to post my workaround for my particular use-case. So I’m using the lookup keys to give multi-tenancy and I use {COMPANY_ID}. So when executing things with a stored proc or function - the DB is blissfully unaware of the Company and there’s no other way (I think?) to get the lookup key from DreamFactory except for this:
So I have this tblCompany which has the list of all companies- but if I request the table through REST DF as per normal it only every sends me “my” fk_companyID = {COMPANY_ID} so I then do this, cache the value and then it’s available throughout my app for use in the stored procs. i.e. Use normal DF functionality that does use the lookup key to filter responses in order to get those responses “manually”.