Hello everyone and special Hi to our champion Alex Medved
I built a form with multiple fields to track correspondences in our entity and one of these field is Formula field to calculate the late one, the field work fine calculating the number of days the correspondence not completed, but I need the calculation to stop adding +1 when the status = Completed
This is the Formula:
IF((EQUALS("[entry.CorrStatus.label]","Completed")), 1==1, IF([entry.WeeklyCorr], "0" , IF(((([entry.TargetDate.formatDate(JAVA_FORMAT)]-[entry._today])/86400000)*-1) >=0, ((([entry.TargetDate.formatDate(JAVA_FORMAT)]-[entry._today])/86400000)*-1) , "0")))
Where 1==1 is the value that I need it to be ignored (don't increment)
I tried to use the field value with no luck:
IF((EQUALS("[entry.CorrStatus.label]","Completed")), [entry.myFormulafield], IF([entry.WeeklyCorr], "0" , IF(((([entry.TargetDate.formatDate(JAVA_FORMAT)]-[entry._today])/86400000)*-1) >=0, ((([entry.TargetDate.formatDate(JAVA_FORMAT)]-[entry._today])/86400000)*-1) , "0")))
Also I tried this (empty if the first statement is true):
F((EQUALS("[entry.CorrStatus.label]","Completed")), , IF([entry.WeeklyCorr], "0" , IF(((([entry.TargetDate.formatDate(JAVA_FORMAT)]-[entry._today])/86400000)*-1) >=0, ((([entry.TargetDate.formatDate(JAVA_FORMAT)]-[entry._today])/86400000)*-1) , "0")))
So the goal is to keep my Formula field not updated (keep old value) if ((EQUALS("[entry.CorrStatus.label]","Completed") is true
Sorry, I dont understand your formula... what is JAVA_FORMAT and what is 1==1?
Also, you seems to try to format the data as text (by attempting to use the formatDate) and then do some calculations... on text values?
In general this should be something like this... as far as I understand what you want to do
IF (EQUALS("[entry.CorrStatus.label]", "Completed"), 0, <HERE ADD CALCULATIONS>)
Change the <HERE ADD CALCULATIONS> to the formula you want to use and calculate whatever you want to calculate
Thank you so much Alex for your Replay
Don't spend much time on my Formula, what I need to keep the old value of the formula field if the conditions is true, so instead of 0 I need to keep the old value
IF (EQUALS("[entry.CorrStatus.label]", "Completed"), <Don't do anything, keep field value as it's>, <HERE ADD CALCULATIONS>)
I hope it's clear now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.