One table field in another table

How do I take one field from a table and have it also populate in another table?

You’re going to need to include more context than that. There are a lot of ways to do that depending on when and how you want it to populate, and which tables they are, and probably more things that I don’t even know.

@Banderson I do apologize I was unaware. Was thinking keeping it generic would be ok. I am wanting to take the Part.Refcategory and have it populate in the InvcDtl table. In TEST, I made a UD for it, but can’t figure out how to put the data in it, or that is even the right way to go.

Is this a one time thing? or an ongoing thing?

I’m guessing it’s an ongoing, but you will need an initialization. For that, use DMT. Write a baq to get the information you need to write the to the table.

For the ongoing population, you will need to make a method directive BPM (since it’s two different tables) and write to the InvcDtl table. You’ll have to see if the Part.Refcategory table is part of that data set (the tt tables that show in in the BPM’s). If it’s not, you will have to do some more work to bring it in, but I think you can do a populate by query to make that work. I haven’t messed with that to much yet.

That’s what I would start with to get that to work. Remember tracing is your friend to find the BO’s that you need to tie this to.

Just out of curiosity, what are you using it for? and is it something that you could just do the cross reference withing a BAQ and not need the field actually populated?

I am trying to make up a dashboard that includes part categories not purchased. Due to the way things are currently being done, Had to use the RefCAt field to do this. I can get the cat purchased, but when I try to do the subquery and say Not in the subuery list, it doesn’t work. The first reason was it was trying to look at the part numbers and not just the refcat’s. So I figured add the refcat to the table. Kinda at a loss. Every idea I’ve been given so far ends in not doing very well. I have set this up to find the parts they are not purchasing, that’s easy. But it’s the refcat grouping that is killing me.

So, I’ve never used that table before so forgive my ignorance. We don’t use the reference category. Do you have the Part table in your query? That field is in that table. You should be able to bring that ref category into your BAQ.

1 Like

Paste some screen shots of your query. I’m curious what you have so far.

To get to the answer of your initial question, yes you can populate it, but you would be using the same criteria/logic to do that as you would out of a query. So unless you need to manually adjust some things for exceptions, I wouldn’t bother with the UD field. Let’s continue the conversation on your other post.

1 Like