SOLVED

One Date Picker Updates another Date Picker

Iron Contributor

I have a Termination Date Picker field and I have another Modified Termination Date Picker field further down in the form.  I would like it so that if the Modified Termination Date Picker field is updated then it will update the original Terminate Date Picker field.

 

2022-10-28_18-28-37.png

 

 

I am open to another idea.  I thought if people click to update the termination date then a new date would be helpful to "update" that one.  Can I just copy the termination field and "use that?"  I don't think I can, as I would be updating that one.

 

 

3 Replies
best response confirmed by Matthew Carter (Iron Contributor)
Solution

@Matthew Carter Will the "Termination Date" field be changed by users from app OR it will be disabled for users and will be changed on when "Termination Date Modified" field is changed? 

 

Try below solution for updating "Termination Date" field on change of "Termination Date Modified":

  1. Set OnChange & OnSelect property of TermDateModifiedDatePicker date control to: 

 

Set(varPopulatedDate, Self.SelectedDate)

 

  • Set the DefaultDate proeperty of the TerminationDateDataCardValue date control to varPopulatedDate

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap THANK YOU!

:stareyes:

 

2022-10-30_22-46-04.png

 

I set the termination date as you said with the variable for onselect and for onchange and I set the variable on the termination date and when I went to check, I set the date to x and then changed the modified date to y and x updated!  THANK YOU!

I found that if I wanted to edit the item and update the date, it would set the "original" date to 2001 as it was "default" and it was set to that variable.  Not knowing how to set the variable and knowing how to barely handle an IF statement, I went to the DefaultDate area and did an IF

I comment the original out as I am still learning.   I set two variables one for the last working varPopulatedWorkDate and set it on DefaultDate

//Parent.Default
If(
IsBlank(varPopulatedWorkDate),
Parent.Default,
varPopulatedWorkDate
)

 

I did the same on 
//Parent.Default
If(
IsBlank(varPopulatedDate),
Parent.Default,
varPopulatedDate
)

 

2022-10-31_17-06-58.png

1 best response

Accepted Solutions
best response confirmed by Matthew Carter (Iron Contributor)
Solution

@Matthew Carter Will the "Termination Date" field be changed by users from app OR it will be disabled for users and will be changed on when "Termination Date Modified" field is changed? 

 

Try below solution for updating "Termination Date" field on change of "Termination Date Modified":

  1. Set OnChange & OnSelect property of TermDateModifiedDatePicker date control to: 

 

Set(varPopulatedDate, Self.SelectedDate)

 

  • Set the DefaultDate proeperty of the TerminationDateDataCardValue date control to varPopulatedDate

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

View solution in original post