Jump to content
Server Maintenance This Week. ×

Concatenate a Repeating Field


This topic is 8759 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

Here's the situation: I have two databases which are linked on a unique ID. Db1 contains person information while db2 contains their reported problems. Each person can have lots of problems (don't we all!). I'd like to take the problems and concatenate them into a single field in db1. Something like: problem / problem/ problem. I'm not sure how to do this. It can't be a look up because the generated concatenation has to be updated constantly. Also the addition of a problem to the concatenation has to be conditional, somthing like: if (problem is active) then add to concatenation.

Is it easier to take the multiple entries in db2 and convert them to a repeating field in db1 then have that turn into the concatenation field. I'm not sure if this makes any sense, but any help would be lovely! Thanks

Louisa

Link to comment
Share on other sites

Re: Field concatenation -

One way to do this would be to use two script and problem only layout, though nt sure if it's quite what you need.

Create a list view layout in DB 2, say "My Problem Layout", which just shows the fields you want concatenated.

Now Create a script in DB2 with just two lines;

Goto Layout["My Problem Layout"]

Copy All Records[]

Goto Layout[Original Layout]

Now whip over to DB1 and create field to put all the data into, say My_Concat_Probs.

Assuminng that the relationship you're using to link the files is 'prob_realtion', create a script in DB1 whicch should look something like this follows;

Go To Related Records[show, "prob_relation"]

Perform Script[External, "DB2"]

Paste[select,"My_Concat_Probs"]

Make sure that you call the DB2 Script you created in the Second line of this script.

That should do the trick - pastinng all the related records into 'My_Concat_Probs' with each problem delimmited by a return, and the individual fields for each problem sperated by a tab.

Hope you can understand my script steps, as my memory is a bit leaky, and I may have the syntax slightly wrong. Drop me a line if you have problems...

[This message has been edited by dickiedyce (edited May 09, 2000).]

Link to comment
Share on other sites

This topic is 8759 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.