Years function in Formula - Set value to date control
已回答Hi,
I have used the years function in the formula control to calculate a new date. I am trying to take this value and set it to a date control to be saved into a database. I can't use the formula control itself, as there are 3 possible options (years, months, days). How can I take this newly calculated date in the formula control and insert the value into the date control?
Thanks!
-
Hi Taylor Howard,
As per my understanding, you are referring to Keywords section in the formula control. If it is true, please check the below suggestion for your use case.We can set newly calculated date in the formula control to any date type control using 'SetFieldValue' rule configured on formula control. The keywords 'Years', 'Months' and 'Days' in the formula control can be used to perform arithmetical operations on a given date input. So, arithmetical operator is mandatory to configure the formula whenever we want to use above mentioned keywords. For example, if we want to get the same date after 10 years from the given date, we should configure the formula as '${Date1} + 10 years'.
As mentioned above, we have already configured a rule on formula control to set the calculated value to date control, it will be set to the date control. Please refer the below screen shots for configurations and better understandability.
Sample Formula Configuration:

Setting Formula value to Date control using Rules:

Runtime behavior:

I hope this helps.
Regards,
Gowrisankar
请先登录再写评论。
评论
2 条评论