Data export help

Hello,

I have a project I’m working on, and I have run into a roadblock for my skill level. We currently track bankruptcy filings across the state. If John Brown files bankruptcy, we enter him into a new record along with all of the case information. If he has a DBA, or other AKAs then we enter that information into fields within that same record. For conversation’s sake, let say John Brown filed bankruptcy and has a DBA of Brown, LLC and an AKA as John W. Brown.

A new client of mine wants the data exported with each additional name on it’s own row. So I’m needing to create multiple rows of data from one record. My final result in the export should be:

Case #, Brown, John…
Case #, Brown, LLC…
Case #, Brown, John W…

Also, there is not always data in these additional fields.

I’m willing to pay someone to do this if they have the skill level. Any help is appreciated and I have to get this done somehow.

Something like this would do it, assuming your field names are Case#, AKA, and DBA

«Case#»+", "+Name+
    ?(sizeof(AKA)>0,cr()+«Case#»+", "+AKA,"")+
    ?(sizeof(DBA)>0,cr()+«Case#»+", "+DBA,"")

I just noticed that you are using Panorama 6; it works in Pan X. I will have to check if this would work in Pan 6. … I checked and this should work in Pan6.

If Tom’s formula works, here’s a simpler version:

«Case#»+", "+Name+
    sandwich(cr()+«Case#»+", ",AKA,"")+
    sandwich(cr()+«Case#»+", ",DBA,"")

The sandwich( function has been a favorite workhorse of mine for decades :slight_smile:

If you want duplicate data in those extra name records, you may want to sort up on case# - so all the names for the same case are clustered together. Then sortwithin Down on the field of that will have the “meat” for the other fields - putting it above its empty siblings. Then Propagate - which will fill the empty fields with content. So now no matter what name you look at, it will contain data for that case.

HOWEVER, propagate is dangerous in the wrong hands. The above assumes the top case record will have content in the field you want to propagate. But if Case A, has content in field X, and Case B doesn’t have any content at all in its field X, then your Propagate will send Case A’s data into Case B. So it’s important to know your data/structures/content.

Too late to edit the post - and mention that with PanX’s relational tools, the details can follow the case number no matter what A.K.A. you are looking at.

I didn’t mention it at first because it requires far more data structuring than just importing multiple records for the same case.