Hello,
Currently i am able to achieve this View see pic 1.Which is just one custom post of <JOB> and a Cred form called[Approval] inside the content template of a <JOB> that alters the values so it shows approved or rejected, pretty simple, which is was what i wanted.
Now i had to separate the Status field to another custom post called <APPROVES>. What i have now is two custom posts. <JOB> & <Approves> and they are related as one <JOB> to many <APPROVES>.
So basically what Im trying to show in the new View called-->[Admin All job] data entries from both posts same like before in Pic.1 but that wont happen. It shows me new posts from the <APPROVES> custom post [see pic 3].
Maybe im doing something wrong , should i change something in the view settings?.
Many thanks
It sounds like you need to use two nested Views. The outside View will be a View of Jobs, with 4 columns. This outer View should not include the Approves post type. Then you will create a View of Approves, with a Post Relationship Query Filter set by the current post in the loop (i.e. the current Job). Nest this View of Approves inside the 4th column of the View of Jobs, and you will display a list of the Approves associated with the current Job.
Hello Christian,
Nested view, is there any tutorial on this, or you could possibly try to explain the steps a little bit more detailed please as i have never tried this before. How do i add a view inside a view?
Thank you
I see what you mean now.
The thing is i dont want to display a list of approves. The Cred form now creates new posts <Approves>.[Before it only edited the existing approve field to show current values for example reject or approve].
But now i changed the Cred form to publish <Approves> posts cause i am using it to track how many times a form was rejected or approved and display the dates of those posts as a list something like track history. Can i only display the last Status? The current status and not all of them. Same thing like the Pic 1 i attached. I will upload now a pic of what the form does.
The best approach is to use a View and limit the results. In the View editor screen, look for the Limit and Offset section. If you cannot find it, scroll up to the top right corner and click "Screen Options" to activate the Limit and Offset section. Set the limit to 1. Then in the Ordering section, sort the View by post date, descending order. Again if you cannot see the Ordering section you can activate it in Screen Options.
My issue is resolved now. Thank you!
Hello Christian,
A question regarding this topic, how can i filter results inside of search and pagination based on if its Approved or Rejected from nested views? It dosent give me any results.
Thank you for your help
Hi, you cannot filter a View of Jobs based on information stored in related post type Approves in the current software, so you'll have to use another approach. One idea is you use custom code to set a custom field value in the Job post whenever an Approval is accepted or rejected. You can do this with the Forms API cred_save_data: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
If you need more detailed assistance implementing this API, feel free to open a new ticket and we will be glad to help.