[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 578
  • Last Modified:

FM - What Method to Use When Field is Both Looking Up Data and Needs Data Entry

I have the following scenario and wondering if the only solution is two separate fields.  I need a field where it sometimes needs to copy the commission amount from another table/field and sometimes I need to enter it manually.  I thought of a lookup or auto-calc; however, the I need to create the Closing Notes record at the same time I create the listing record and thus the commission to be oopied is empty at the time of record creation.  I can solve this by using a script trigger to relookup at the time I need to enter the closing notes for a sold property; however, this relookups all records and will overwrite any manual entries with the blank field over in the other table.  

Question:  Is there a way that I can force a lookup on only one record?  Or, am I stuck with creating one calc field and one manual entry field?
0
rvfowler2
Asked:
rvfowler2
  • 3
  • 2
2 Solutions
 
rvfowler2Author Commented:
Of course, there is always a script step of If not IsEmpty, copy the contents over.
0
 
Will LovingPresidentCommented:
Instead of using a relookup in your script trigger, just use Set Field with a calculation referencing the commission. That should update just that one record.
0
 
rvfowler2Author Commented:
Thanks, definitely overthought that one.  And in a related issue, there is no way to force the auto-calculate to recalculate like you can with relookup, correct?
0
 
Will LovingPresidentCommented:
The main way to do this is to uncheck the "Do not replace existing value for field (if any)" checkbox. This means that the auto-entry calculation is triggered anytime values or fields referenced in the calculation change. This is often used in place of an unindexed calculation in order to have an indexed field for the child side of a relationship.

You can also use this option to do things like re-format a field's entry to standard format, for example stripping all double spaces, re-formatting a phone number to a standard format (usually via a custom function), or stripping off styled text formatting such as color, size and font, etc. You can also use this in combination with the "Self" function so you don't even have to specify the field by name and can put the same auto-enter calculation in lots of fields. for example:

TextFormatRemove ( Self )

Here's a short article on feature: http://fmlayoutmode.com/wp/?p=1942
0
 
rvfowler2Author Commented:
Thanks, I did use your tip about autocalc to correct phone numbers and both cleaned up my database and have auto-calced it to auto format any phone numbers entered in the future.  And thanks for the db merge article; just merged my 4th set of databases.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now