- July 28, 2020 at 2:53 pm #31712
Hello, could you help us with calculating the age of an X item (current date – date picked by user), place it the result inside a field (or/and) be able to set logical conditions related to that field (ex. if age > 6 then show note or if age <6 then price based on (Y choice) equal to $500)?
Thanks.July 29, 2020 at 9:57 am #31715August 17, 2020 at 3:40 pm #31777
Thanks for the response.
Is it possible instead of a date picker, to put a dropdown where user can choose the date of purchase up to 25 years and >25) and automatically do the same calculations based on the current date?
Same rules as per my prior message, in that case and put that in an hidden field.
Thanks in advance.August 18, 2020 at 11:36 am #31782August 18, 2020 at 11:41 am #31783
but how can I keep the current date relevant and always subtract the year the user chose (dropdown) from the current day with the logic fields?
Thanks.August 20, 2020 at 9:52 am #31786August 24, 2020 at 9:32 am #31803
the values will be years (when the vehicle was purchased), starting from the current year (2020) and back to 25 years (1995) and a value which represents any year before 1995.
Thanks.August 25, 2020 at 10:56 am #31810September 23, 2020 at 1:38 pm #31971
Hi Ally, I know it’s been a while,but I just tried to implement the code and it won’t work, if I’m not missing something.
Please have a look at the current form and image attached:
When I choose 2015 for example, I need the code to calculate (current year -2015) and give the years at the hidden field.
Then I’ll use with other variables to calculate if it’s too old and show a text note.
At this stage, that calculation is not happening.
Am I doing something wrong?
Attachments:You must be logged in to view attached files.September 24, 2020 at 10:22 am #31978September 28, 2020 at 12:43 pm #31994
Hi Ally, you’re right, I just changed the code and it works.
can I add a field where price will be calculated based on different conditions?
Ex. If age of vehicle is that (taken from field), and type is that (another field), then give this price (in a field). That’s just an example, I need to use more variables.
ThanksSeptember 29, 2020 at 9:51 am #31998
- You must be logged in to reply to this topic.