populate a field based on form logic

David Solecki

New Member
Is it possible to populate a field based on Form logic? I have a condition that if a DropDown (Field 1) = Other, then set field 2 as visible. If field 2 is visible I want to write the vale in field 2 to my database, if the drop down is a value other than "Other" then write the drop down value to the database. I cannot seem to find a way to do this using the Calculated Field Types

Is this possible? I am pretty new at TracerPlus. I have been watching the videos, but am struggling with a few different concepts that I have accomplished in Visual Basic (Yes the only platform that I could develop on at work was VBA in Excel which I was able to accomplish quite a lot in)
 

James

Member
I think you have to write both fields to the db every time, even if field 2 is blank. If you want the field 2 values saved in field 1, you'll either have to use SQL to move them afterwards or make sure the drop down has "restrict to list items only" unchecked. With that turned off, the user can type other values into the drop down as well as select from the menu.
 

David Solecki

New Member
I did not see that option to restrict to list items only. That may solve all of my issues. But writing both to the database and letting my other software handle the reading and parsing of that data could be the answer for us too. Thanks for the info.
 

Joseph Kraebel

Administrator
Staff member
You may be able to use logic with this if you are ok with overwriting the value in field 1's drop down if it is set to Other. Basically you could do an If field 2 is not null, set value of field 1 to field 2's contents. The full rule may go something like this:

On AfterScan of Field 2, If Field 2 != (blank), Set Value Field 1 to [*1*] (Contents of field 2), No Else

Replace the field #'s with their appropriate control IDs in the logic rule.
 
Top