In a drop down list, I am trying to guard the user from picking values that are already picked (pre-existing in the table of items).
I have the following BOs
Project
Resource (a single peer attribute of ProjectResource)
ProjectResource (owned by Project, many allowed, contains Resource)
When I am in the Project Form, and on the table of items for ProjectResources, I choose "add new", which brings up the ProjectResource form. In that form, Resource is a drop down attibute. I do not want the user to be able to add a new ProjectResource that already exists for that Project. So, I use a custom query for the drop down list.
The following has no errors, and works to the point just before the last "AND" keyword. However, Project seems to lose context in the "ProjectResource.Project=Project" at the end of the statement. I.E. Resources are still listed in the drip down, that already exist in ProjectResource, for the Project that was in context at the "Add new" ProjectResource on the Project form.
FIND Resource WHERE Resource.ResourceType='Internal' AND NOT(EXISTS ProjectResource WHERE (Resource=ProjectResource.Resource AND ProjectResource.Project=Project))
So, " AND ProjectResource.Project=Project" is not working. I also tried =ThisProject
Any ideas to get Project in context?
Dave
