Function Problem: pulling in data from another table
I havs a database with records
Opportunity 1:n Calls
Opportunity 1:1 Current Status
(note: before you ask, the 1:1 is deliberate and my prefered way of implementation)
Both calls and current status have a field opportunityID which correlates to the Id record of the Opportunity (record)
I want fields in the Current Status record to be populated from the last Call made in respect of the Opportunity. Call records are created chronologically so the last call is going to have a higher Id.
I am using a function to pull the data into the Current Status table, but it doesn't seem to work and I'm not sure where I am going wrong. The function I am using, for 'Next Action Date' for example is:
last((select 'Calls' where opportunityId = opportunityId).'Next Action Date')
Where am I going wrong? How should I be coding the function.
Any help appreciated. Many Thanks.
2 replies
-
Hi,
---
let myID:=opportunityId;
last((select 'Calls' where opportunityId = myID).'Next Action Date')
---
Leo
-
So near and yet so far!! Thanks for this Leo. Much appreciated - and very quick response too!
Content aside
- 6 yrs agoLast active
- 2Replies
- 1877Views