Ask Your Question
0

Can I have a field in base that is a combination of two others?

asked 2016-10-20 22:57:07 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello everyone,

First of all allow me to say that I am very new to all this. I just started my company and took the decision to avoid getting involved with Microsoft as I feel uncomfortable and an uncertainty with the costs. So excuse if my question shows a bit of naivety.

We have an ID field in our database of expenses, as well as a year field. So when we put an new entry it takes a new ID (integer) and then a year entry. However we want to have a field which is the document (expense) Ref No. which looks something like Exp1601, where Exp is a string (expense) 01 is the ID and 16 is the year. Is there a way to have a field that is basically a concatenation of these two other fields?

Many thanks in advance for any help and for your time.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-10-20 23:50:44 +0200

Ratslinger gravatar image

The basic setup for entering new records contains controls which are not aware of the contents of each other. Therefore using a standard entry form this is not possible. SQL can concatenate data from fields into another but this then requires an additional step in creating a complete initial record (besides the impracticality).

The other possibility is through coding your own macro to create this field based upon the other entries. However, I do warn that without LO macro coding experience already, the learning curve is steep.

The most practical solution without coding is to either manually enter this (prone to error if ID/Year not same as other fields) or to enter EXP1601 as the actual ID since it seems to be unique.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-10-20 22:57:07 +0200

Seen: 186 times

Last updated: Oct 20 '16