Sure, I've set your next reply as private.
FOr some reason my reply did not get added privately?
Hi,
I've read the requirements shared in the last message and have checked the involved views and custom shortcode, but, unfortunately, I couldn't fully understand what you're trying to accomplish.
Also, I couldn't connect how this is related to the count of the garage's scenario that we've been discussing in this thread and which is now working.
If you'll check the view "View to get the garage count", we're telling the view to bring all posts where the "Vehicle Location" field's value is equal to what is available in the shortcode attribute "post".
( screenshot: versteckter Link )
But, if you'll check the "Query Filter" section of the view "view to get the absense points", it is linking "post" shortcode attribute to multiple custom fields, which will never work.
( screenshot: versteckter Link )
Can you please share some details about what was expected from this new view "view to get the absense points" and I'll be in a better position to suggest the next steps.
Note: I've set your next reply as private again.
regards,
Waqar
I didn't mean to be confusing and I thought that maybe you nailed the issue with the filter but that didn't solve it. I changed the shortcode to 'view'.
Anyway, I am trying to do a similar calculation except across field values not locations. So I figured I would use the count in the output of each view for each different field and total them up for each user-id in the absense view. For example:
If 'devtools' user had a value of 1 in the 'left post early' field and a value of 1 in the 'no call no show' field the total should be '2'. However, if 'devtools' user had a value of 1 in the 'left post early' field on one day, a value of '1' in the 'left post early' on another day, and a value of 1 in the 'no call no show' field the total should be '3'.
Hello,
Waqar is on vacation, I will take care of this thread, but I am missing in this thread.
I assume we are talking about your website:
Please elaborate the questions with more details:
If 'devtools' user had a value of 1 in the 'left post early' field and a value of 1 in the 'no call no show' field the total should be '2'. However, if 'devtools' user had a value of 1 in the 'left post early' field on one day, a value of '1' in the 'left post early' on another day, and a value of 1 in the 'no call no show' field the total should be '3'.
Where and how can I see the 'left post early' field and 'no call no show' field?
Where and how do you want to set a value of 1 in the 'no call no show' field the total should be '3'?
Where and how can I edit your custom PHP codes?
Please provide detail steps for above questions? thanks
Please make my reply private
OK, I can find the "left post early" field and 'no call no show' field, where and how do you display the total value in front-end? or where and how do you want to store this value in backend of a custom field?
Please provide the URLs and take a screenshot for it.
I have checked the URL you mentioned above:
Search with keyword "total", but found noting.
Please make the reply private.
Private message box enabled again
If you don't mind please remove the url references from the public replies above. Thanks.
OK, Each absense related post under the 'time' CPT tracks these things. For example, versteckter Link
If you look in the post the 'user' received the leave type 'Tardy (61 Min+...) which has the associated field value (tardy 61) of '1.5'. If I was simply displaying the value they currently have, this would be easy. I would just place all the fields in the view and one of them would have a value for the post in the loop. But that isn't what I'm trying to do.
I/m trying to generate a running total of points that are received to date. So if someone received 1.5 today but they received .5 (for a different reason) last month I want to be able to add them up automatically (say, between a 6 month period).
So that is why a figured if I generated those views first and then added the views together that would be the way to go. But perhaps I was wrong.
Thanks for the details, there isn't such kind of built-in feature within Toolset Views, Views can only display data and can not calculate the values.
In your case, it needs custom codes, but according to our support policy, we don't provide custom codes support:
https://toolset.com/toolset-support-policy/
For example, you can create a custom shortcode with a custom PHP function:
https://codex.wordpress.org/Shortcode_API
In this function, get the 'time' post custom field value:
https://developer.wordpress.org/reference/functions/get_post_meta/
Check those value with your custom conditions: if someone received 1.5 today but they received .5 (for a different reason) last month
And display the value you want.
I have removed all links in my answers above.
My issue is not resolved.