I have been asked to auto-populate a date field when i certain Status has been selected in a different field. For example when record is placed in ‘Released’, ‘Closed’, or ‘Declined’ Status, the date field should auto-populate with system date. This is the formula i have, and i placed it in the Input Translation area for the Date field, and it still isn’t auto-populating:
@If(Status = “Released” : “Closed” : “Declined”;@Now; “”)
Any suggestions?!?
Subject: Auto-populate field not working
are you opening the document and saving it or did you just add this and expecting it to work for old docs you are viewing? Also, you should add an IF statement to check if the Date field is already populated, otherwsie the date will change each time the doc is saved.
Subject: RE: Auto-populate field not working
I added this to old docs already in the database and expecting it to work. Will this only work for new docs? Can you provide an example of what the if statement would be to check the Date field to see if it is already populated?
Thanks for your help.
Subject: RE: Auto-populate field not working
the InputTranslation event will only trigger when the doc is refreshed. So in order to populate the Date field for existing docs you’d need to refresh them either by opening them or running an agent using either the ComputeWithForm method (kinda slow) or you could try an action button using @Command([ToolsRefreshAllDocs]). You could also run a formula agent against all docs using the same formula you are using as your InputTranslation formula.
@If(Date = “” & Status = “Released” : “Closed” : “Declined”; @Now; Date)
Subject: RE: Auto-populate field not working
Ok, cool. I will go ahead and try a few of these options to see which ones work the best for me. I really appreciate your help, i am still kinda new at this.
Subject: RE: Auto-populate field not working
Oh another quick question…is the Input Translation field the correct area to place the formula in or should i be putting it in a different place?
Subject: RE: Auto-populate field not working
inputtranslation is fine if you want the field to be editable by the user (if visible) but if you don’t want the field to be changed manually then make it computed and use the same formula as the value.