Input fields validation

0
In my application i have three input fields as shown in the image. Now if the subscription term is 36 months and the start date is 25.03.2024, the end date should auto populate to 25.03.2027.  Any idea would be helpful.   Thanks in advance.
asked
4 answers
0

Hi Abdur , 

 

As Bhargav told , you can implement but you have to use addMonths function instead of addDays

answered
1

Hi Rahman,

 

You can use OnEnter or OnLeave events on both Subscription terms and Subscription start date.

So that you can get end date on Modifying any one.

 

Coming to microflow, check whether both Subscription start date and Subscription term is filled by using decisions.

 

Then, Create a variable of dateTime and use addMonths(start date, term) function to get the end date.

 

Finally assign the created dateTime variable to Subscription endDate attribute by change object event with refresh set to yes.

 

Hope this helps.

 

Regards

Bhargav Ram Singh Bondili

answered
1

Hi Rahman,

 

If you want to check the endDate, you can debug the microflow or you can use log.

 

But running in production and everytime hitting the log when running the microflow is not acceptable. So use debugging for check.

 

And as I said, opt to refresh in Client as yes in change object event. It will refresh that input with that value you obtained from microflow.

answered
0

Hi, 

Thank you for the answers. But i have tried a approach.

 

First i have disabled the input field conditionally by setting the boolean value.

 

In the Onchange event I have called the microflow, in that microflow I have created a variable and used addMonths function which takes in two parameters as shown in the

image, I have logged the varibale to check and the months are added to the current date entered. is this way of approach is fine? if yes... I have a question, how do i append the value stored in the variable to the subscription end date input fields.

 image.png

answered