Hi, I have 2 tables and two forms. In table ...

references
(Nick Parsons) #1

Hi, I have 2 tables and two forms.

In table 1 I have a list of locations, each with a key (unique reference).

When a user completes the form for table two, adding a new record, when the user selects the unique key in the form, how would I look up the values in table 1 to auto insert values into a column of table two?

A lookup kind of function?

(Levent KULAÇOĞLU) #2

@Nick_Parsons1 can you elaborate your query? You can use LOOKUP expression for sure i.e.

LOOKUP(LookupValue,TableName,LookupColumnName,ReturnColumnName)

(Nick Parsons) #3

@Levent_KULACOGLU Basically to enable quick form filling, a user will select a location ID from a dropdown list.

(I would like to have this list take its data from a table as will be quite a few items).

When the user selects a location, WO1 for example, the form will automatically complete the next couple of form fields.

For example, Zone Description and Zone Location.

(Levent KULAÇOĞLU) #4

@Nick_Parsons1 if you have Zone Description and Zone Location also existing in your lookup table, than you can set below Initial Values to these columns in your Column Structure to retrieve those values:

LOOKUP([_THISROW].[Location ID],“Locations”,“ID”,“Zone Description”)

LOOKUP([_THISROW].[Location ID],“Locations”,“ID”,“Zone Location”)

(Nick Parsons) #5

@Levent_KULACOGLU Does the column type have to be anything specific?

I am also trying to have the location ID in the form on a dropdown where the list of items is taken from my Location table?

I have included the formula in the initial value but get no result.

I will have something wrong!

(Levent KULAÇOĞLU) #6

@Nick_Parsons1 I assume all the values are Text based. Please adjust the expression as required by your app/table structure. The structure is simple:

LOOKUP(LookupValue,TableName,LookupColumnName,ReturnColumnName)

(Nick Parsons) #7

@Levent_KULACOGLU Hi, I managed to resolve this (with help) by using:

TableName[column] in the valid if section.

It seemed to work very well.

(Levent KULAÇOĞLU) #8

@Nick_Parsons1 I didn’t understood that you were trying to gather the values in a dropdown, but require a single value instead. Therefore I insistingly proposed the LOOKUP expression. Do apologize for my misunderstanding.

(Nick Parsons) #9

@Levent_KULACOGLU Not at all, Its very difficult to put in text sometimes what im looking for, thank you for the help.