This topic contains 3 replies, has 2 voices, and was last updated by Dennis @ PerfectForms 7 years, 4 months ago.
- AuthorPosts
- October 22, 2013 at 10:14 am #6822
Hi,
I am trying to use a form connection in a way in which I am not sure how to…. Let me explain: In a form I am currently building I want to be able to do the following.
When a dateInput changes field data start a behaviour to connect back to all other submitted instances of this form and retrieve all the data from a field (date values) that were entered. Once I have this return I then want to be able to filter this down to give me a count of the results that match the month value of the dateInput (the one that triggered the behaviour) the user pressed…
I have managed to setup the connection and the action to retrieve the data and place it into a hidden field but that is a far as I have got. Could anyone provide any tips for how I might structure a function to count these results that match the month value of the dateInput….
October 22, 2013 at 10:27 am #6827Use a hidden helper (month). When the date input changes data populate the helper with the month value. Then use that month as a send parameter to the form connection. You will have to modify your form connection to use the month field as a send parameter. Return any value to a hidden helper table (use a meta-data field so you know there is a value for every matching instance). Then use a set field with a sum function to give you the number of rows in the table.
October 22, 2013 at 2:14 pm #6830Okay, so it looks like I got it to work but how would I include the Year ?
For example, it’s finding results for October 2014 (when there is only an October instance for 2013). I am not sure how to structure the formula to place into the helper Month and Year… to do just month I used the getExactMonth but what operator do I use to make the formula return both?
October 23, 2013 at 8:53 am #6844Use separate helper fields and send parameters for Month and Year.
- AuthorPosts
You must be logged in to reply to this topic.