Thanks for taking a look, but how would I do this generally?
That is without knowing in advance what the entry is?
I need to both compare the values of one field and then do the math between two other fields in two different entries, without knowing in advance what entries these are.
What is your picture of how this would work? Or what is the expected workflow to get to the point of the need for the calculation?
<p><p>Users chooses a 'case number' and enter a bunch of data including a 'price'.</p><p>If the 'case number' is the same the View will display the differential between all the values entered in the 'price' field.</p><p>It doesn't need the original value. It can be displayed anywhere the admin can see it - A private View, the Entries page what have you.</p><p>After not having much luck with Views, I am now looking into getting the array of all the entries and see if i can do something there.</p></p>
Do you have anything public to share that I could get a little more insight out of? The description doesn't quite allow me to wrap my head around it. You can email me if it needs to remain semi-private ([email protected]).
Hi,
Prefer to keep this public.
https://i.postimg.cc/L8htM3rg/form-results.jpg
Here is a screen cap; The view or the custom page would show the Case Number and the Difference between the two values.
Is that clearer?
This helps. Thanks for that image. So then is it possible that a case can an undefined number of values or is it always the 2 values?
Yes, only two per case.
(Anything more than 2 will be an error & can be ignored. Not sure how to check for this error, but that's a less important item)
These submissions can be within a longer period of time, not in consecutive days, with other submissions between them.
So there are only 2 values that matter per case. But then multiple submissions for the same case can occur, if I'm following correctly?
So what 2 values of all submissions within a case matter (just max and min or something else?)?
Only two submissions per case;
The value of "Settlement" can be any number.
The only things that matters to us is settlement_1 - settlemtn_2 = result.
The view needs to show case_number and result
We can assume that more than 2 submissions per case is not allowed.
Let us try this then:
[frm-math] [frm-stats id=x type=maximum 25="[case_field_id_here]"] - [frm-stats id=x type=minimum 25="[case_field_id_here]"] [/frm-math]
25 should also be the case field id. the only difference is the value will be dynamic using brackets [25] around the actual field id of your form for the case field. This is presuming that there is always a different as well. Also, presuming this will display in a view.
Thank you Bobby, but I am getting no result - perhaps I am not understanding the logic here.
What I am looking for is;
> Check if field id#8 (case number) is the same in two entries
> If it is the same - look at the value in field #10 (settlement) for these two entries - Rows
> substract one from the other and output the result in the view.
Thanks
Ok. My last post was my attempt at exactly that. Let me work it out in a test environment when I get a moment and we'll see if it works the way I'm thinking. If it does, I'll share that with you.
It works on my side: https://www.techmavenconsulting.com/dev/blog/frm_display/case-settlement-input-view/
"Oops! That page can’t be found."
Case is ID 8
Settlement is ID 10
Where am I wrong?
[frm-math] [frm-stats id=10 type=maximum 8="[8]"] - [frm-stats id=10 type=minimum 8="[8]"] [/frm-math]
Thank you Bobby,
I was using a lookout field, for the case number. That's why it wasn't working.
Sorry about that.
When I switched to a regular field it worked! Thank you.
Daveed
V_curious
https://postimg.cc/rzQM4NbX
https://postimg.cc/YhGZSNBx
Perhaps a setting on the lookup field?
Can you share screenshot of entries?
Of course: https://postimg.cc/9DKwPhD9
Seems to me it should work with lookup as it is, unless if for that specific entry, the field values have not been updated after adding/removing fields.
This is true for all entries including new ones.
When I build this in production, I will try with the lookup field first. Perhaps it's the data, or something else.
I want to thank you very much for the help. It's been a while since I worked with some of the new features of Views. I was in the right direction but the 'results' setup was the key.
Once I get paid for this task I will make sure to visit your web site 😉
I will also keep you mind should I require some Formidable Pro customization for a specific project.
All the best
@dgodfather
Hi Bobby thanks to you I have made some very good progress but I am stuck with one issue.
Could I ask you? Or should I start another thread?
Start a new one. Particularly if it doesn't relate specifically to this issue. This one is pretty lengthy.
Please login or Register to submit your answer