Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Recommended Posts

I am trying to fill in two fields from related records but cannot figure the correct working way to do it.

 

In my main table (DwellTimes) I have a lot of imported data from an AVL system. One of the fields with data is Stop, which has all of the stop names. I created two fields, StopNumber and Timepoint (the imported data does not have these two fields). I created a table (StopNumbers_Names) that has all of the stop names and the associated stop numbers. I also created another table (Timepoints) that has a list of the stops that are timepoints. Not every stop is a timepoint, that is why I created two tables.

 

1. I would like the StopNumber field to be filled in from the StopNumbers_Names table. If a stop name equals a name in the StopNumbers_Name table, the Stop Number should be filled in. Example, in the DwellTimes table a stop named Lorene7th matches in the StopNumbers_Names to Lorene7th and has a stop number of 10000, I would like the 10000 to be placed in the StopNumber field of the DwellTimes table. I made the StopNumber field a calculation field with the following calculation with a result field of number (all stop numbers are 5 digits), but it does not enter the number in any of the records.

 

If (Stop = StopNumbers_Names::StopName ; StopNumbers_Names::StopNumber ; "" )

 

2. If the DwellTimes field Stop is in the Timepoints table, I would like "Yes" to be entered in the DwellTimes Timepoint field. I made the Timepoint field a calculation with the following calculation with a result field of text, but it returns "No" in all records.

 

If ( Stop = Timepoints::TimepointName ; "Yes" ; "No" )

 

Any help would be greatly appreciated.

 

Thanks,

 

Craig

Link to comment
Share on other sites

1) Don't use a formula; use the auto-enter option called a Lookup.

 

I would like the StopNumber field to be filled in from the StopNumbers_Names table. If a stop name equals a name in the StopNumbers_Name table, the Stop Number should be filled in

 

(emphasis added)

 

2) I am not clear, from your post, on what relationship you have set up between DwellTimes and StopNumbers_Names. I assume there is a field called Stop Names in DwellTimes? And do I correctly understand that the StopNumbers_Names table has a Name field? Have you crteated a relationship between DwellTimes and StopNumbers_Names, like so?:

 

DwellTimes.........StopNumbers_Names

_______________________________

Stop Names = Names

 

 

3) Once you have that relationship set up (if you don't already), set the auto-enter option in DwellTimes::StopNumber to lookup from StopNumbers_Names::Stop Number

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use