I have a list of documents that require periodic reviews. I would like to have a Calculated field that adds a Red border on the Title field when the Review Date field is =< Today, and Amber if the Review Date field is Today -1 Month.
JS is not allowed hence the need for a Calculated field.
Title - Text Filed | Review Date - Date Field | Todays Date 21-11-2022 |
Document 1 | 25-10-2022 | Red border because it is past Review Date |
Document 2 | 12-12-2022 | Amber border because it is within 1 month of Review Date |
Document 3 | 20-02-2023 | Nothing as it is over 1 month from Review Date |
Thanks in advance
Pete
Solved! Go to Solution.
Views
Replies
Total Likes
You can achieve this by putting javascript something like below in the calculate event of the field whose border color need to change:
if(CallFunctionToCompareDateWhichReturnTrueOrFalse(putCurrentDate,DateofYourField)){
this.border.edge.color.value="255,0,0";
}else{
this.border.edge.color.value="255,255,0";
}
You can achieve this by putting javascript something like below in the calculate event of the field whose border color need to change:
if(CallFunctionToCompareDateWhichReturnTrueOrFalse(putCurrentDate,DateofYourField)){
this.border.edge.color.value="255,0,0";
}else{
this.border.edge.color.value="255,255,0";
}
sample :
xfa.resolveNode("form1.#subform.TextField1").border.edge.color.value="255,0,0"
Views
Likes
Replies
Views
Likes
Replies