I thought I had this solved in my previous post, but apparently not.
My app’s users can create multiple projects (I have a “list of project type” in the users data type).
Separately, users can also create jobs and add these jobs to their existing projects - if they want to. So there’s a list of jobs in the user’s data type and in the project’s data type.
So while creating job page - I show them a list of project’s and they can choose one project to associate the job with or leave it blank to associate it to the user directly.
Now, in my Job’s data type I have a “for project” field of type project - and I assign the value of the dropdown to this field - and that’s great I get to reference the project from within the job.
My question is - how do I list all the jobs a particular project has?!
I have a list of job types in the project data type - but I don’t know how to populate this field.
Hi there, @deburhuduga… there are a couple of ways to get the list of jobs. Because you are on the page of a specific project, you could do a search for jobs with a constraint where for project = the current page’s project.
Another way to go is to keep a list of jobs in a field on a project. So, when a job is created and a project is selected for that job, add the job to a list field on the particular project, and you will always have “easy” access to the jobs associated with a specific project.
You don’t want to make changes to a list of projects (i.e., you are using the wrong workflow action)… you need to make changes to a single project, and the project to change is the one selected in the dropdown. The change to make is to add the result of step 1 (i.e., the newly-created job) to a list field (that is linked to the job data type) on the project.