Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

My inventory file i like to purge tagged records to a History table inside my application..

I am trying to understand the flow.

If I have a foundSet of tagged record

It seems like must export out to a New file..

Then Import ?

I looked a Copy All.. but don't get it

Something I haven't needed to do before

TIA

Posted

That makes sense,

Okay... i created a History file, and my FoundSet has 2 records.. Looking at my screen capture using the import.. I am only getting 1 record important testing using 2nd dialog...and it blowing my mind.. some seems so simple

Thanks for your time'

Rod

help1.jpg

Posted (edited)

What possible reason the import only gets 1 record of my FoundSet?

I have 1 file called Inventory... I copied its structure... to new called it InventoryHistory within the same file.

My Get Findcount say 3 records for Inventory

The next command is Import but it only brings in 1st record..

help2.jpg

Edited by Guest
show anothe image.. I stumpped such a simple thing
Posted (edited)

Something's missing in your description, because that's basically impossible.

Your script is completely different from your description.

For one thing, you're not going to the the target layout before importing.

You want to go to the source layout first, then set up your record set. Then go to the target layout (layout that will receive imported records) and perform your import. In addition your script seems to be calling a completely different source file but that is hard to tell.

InventoryTest.fp7.zip

Edited by Guest
Posted

In addition to Bruce's observations;

1. You do not need to Show All Recs before a Find. Find always operates on all records.

2. Be careful when you call a subscript, such as your Custom Auto Delay Message...". This subscript may switch your context (layout). You need the Go to Layout ["Inventory History"] before the Import Records step, as Bruce points out.

3. You capture $tmp to be TotalRecordCount. I would think that you want Get(FoundCount)--the count of records imported.

Posted

Bruce sir,

Thank you so much..

Ok, fresh start, I created a new layout point to Source Inventory file ( before it was too name wasn't clear)

My Inventory History file is related to Inventory

and all looks tight and in place

When I step though the Find, My FoundSet is 3 out of 5 records in Inventory which is correct

Still, when I moved the other layout before the Import command and watch the Debugger in View..

step to the next line... the Layout Inventory History

[color:red]My FoundSet changes from 3 to 1 ?

My import still only gets 1 record

HelpA.jpg

helpB.jpg

Posted (edited)

If you can't post your real file, create an example file and post that.

What you are describing is still basically impossible.

The most likely case is that you are not importing from the file or table occurrence that you think you are. What files are involved here? What is CCCData.fp7? What is the name of the file that your import script is in? That is the ONLY file you should be working with.

Edited by Guest
Posted

I got it working now..

I went and created a sample as you suggested and [color:red]it worked

So it had to be the relation

Starting over.. finally got it working... changing the named relation files.. even thorugh they seem the same.. having a different name that's all .. still seem to point to my main Inventory file...

and Import cmd only selects from source not file names

One question.. there must be some rule that states... "You got to exit out of the app and restart to establish new relationships "

That's when it seems to start working

Is that true

Thanks

Posted (edited)

What I suggested is that you create the sample and upload it here so we can see it.

No, you don't need to exit. You still are not answering questions. What is CCCData.fp7 and what has that go to do with anything?

There are NO other files. This is about ONE file - the one your import script is in. What is the name of this file? This is the file name that must be associated with the import script. Your import script must select as its source the table occurrence that is associated with your source layout.

"and Import cmd only selects from source not file names"

Nope. There are two parts to the import command.

Specify Data Source

Specify Import Order

If your script is in Inventory.fp7 then Data Source is Inventory.fp7

Edited by Guest
Posted

Thanks Everyone.

Even though you don't always get the answers, your feedback steers the mental here...

CCCstar.fp7 is my program... with all my scripts and layouts

CCCData.fp7 is my data file, inside I have 25 tables and no relationships

1 is Inventory the source

2 is Inventory History where I am sending old Inventory to both inside CCCData

I got it working in the stripped down version being so simple... and finally with your help, its working now in my application

..my application is large, 9MB between the 2,,, I had paid a developer almost 3 years to develop this call center application along with myself

Ran out of money.. business is bad for startups

Then copied the call center app, renamed some and moved the same foundation perfect to my 2nd niche application which I am further developing. A membership and POS...

I am old DOS foxpro programmer millions of lines of coding.. no formal , all self hacking... I am trying to and so far except for a few things.. such as these giant RELATIONSHIP windows.. I am still wondering about... seems forever scrolling to the end of my layouts and scripts there so many..

As I do alot of this, i realize also better programmers, like yourself and others here i see always... more elegant coding could be accomplished by myself still a novice..

Thanks for your further patience ...everyone

CCCCd stands for CalCannCallCenter.com

or 'Calif Cannabis Call Center Dispatch and Dispense'

I am the only full blow knock your socks out MMJ 420 Dispensary application out there so far :

Again, thanks

Posted

CCCstar.fp7 is my program... with all my scripts and layouts

CCCData.fp7 is my data file, inside I have 25 tables and no relationships

Generally you will want to have a few relationships in the data file, particularly any cascading deletes if that is something you want.

This is exactly why I asked the question and you're giving the answer I was suspecting. Your import script called CCCData and that is where the anomaly comes from.

Your import script should be importing from CCCStar. That's where your layouts are, that's where your found set is. As mentioned before, you must be sure to import from a table occurrence that is used by the source layout.

Posted

Appreciate your last comments especially

Yes... CCCdata.fpt was wrong.. (it seemed logical since thats where my data is)

I should have used CCCstar.fp7 where my layouts and scripts were..

And as soon as i did so, on the left side of Import dialog box,,, [color:red]I was finally able to select the correct data source..

Why did so... was comparing another import process i have... I am importing from CCCData

Cheers

This topic is 5383 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.