How do I make data pulled from a different ta...

(Marius Scholtz) #1

How do I make data pulled from a different table editable? So I have a service app with two tables. One table for the customers and one table for the actual services logged to each customer.

When I create a new service it creates it by asking for customer that then pulls data from my customer table to populate the service call.

In one of these fields it pulls over I want to be able to edit the information, not necessarily write it back to the customer table just customize it for that service call if needed. As it is it pulls the field and it is not editable.

Thank yuo for any help.

(Aleksi Alkio) #2

I’m afraid it’s not possible directly. You can add a new one (if it’s a ref field) but you can’t edit it.

(Steven Coile) #3

To do what you want, @Marius_Scholtz, add an expression to the

Initial value field of the column of the service call that references data from your customer table. For example…

Suppose the Customers table has the (hopefully self-explanatory) columns: [CustID], [Name], [Phone], and [Address].

Suppose the ServiceCalls table has the columns: [Customer] (Ref to Customers table); [SvcName] (Name of contact for service call; [SvcAddress] (Address for service call); and [SvcPhone] (Phone for service call).

The [Customer] column of the ServiceCalls table would be a Ref type with a ReferencedTableName of Customers. The Valid_If field could be set to =orderby(Customers[CustID], [Name]) to provide a drop-down menu of customers sorted by their names.

The [SvcName] column would be a Name type with an Initial value of =lookup([_ThisRow].[Customer], Customers, CustID, Name), which will fill-in the value of the customer’s [Name] column when a customer is chosen. The filled-in name will then be editable by the app user.

Likewise, the [SvcAddress] column, with Address type, would have an Initial value of =lookup([_ThisRow].[Customer], Customers, CustID, Address) to pre-fill the customer’s address.

And similarly, [SvcPhone]'s Initial value would be =lookup([_ThisRow].[Customer], Customers, CustID, Phone).

Note in the above we use the Initial value field, not the App formula field.

(Marius Scholtz) #4

@Steven_Coile It works beautifully. Thank you for the explanation.