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

Portal not refreshing


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

Recommended Posts

Posted (edited)

Hi,

I'm having some problems with portals after moving from 6.0 to 7.0 (mac).

File 1: customer info

- has portal showing quotations and portal showing orders

File 2: quotations

File 3: orders

When a quotation becomes an order I make a new record in file 3, import fields from file 2 and then show file 1 again. In the orders portal in file 1 the new order does not appear unless I first go to file 3, click outside of any fields (screen blinks once), then return to file 1 and refresh the entire relation.

This worked flawlessly in FM6, but has the above "bug" in FM7. Relations are all intact. Am I missing something?

I've tried going to the related records in file 3, selecting a field and then going back to file 1, but also no luck.

jim

Edited by Guest
Posted

When a quotation becomes an order I make a new record in file 3, import fields from file 2 and then show file 1 again

Well Filemaker 7 is a different beast, having other freshing issues that previous versions did - but switching to another layout usually makes freshing work.

Now am I getting up on :soap: - please bear with me!!

I'm fully aware that your method is as common an approach for handling the issue, but is it particular healthy to store the same data twice?? Since a quotation just is another presentation of the same data the final order holds.

I would in your case if a quotation should be made into an order, set a new orderID in a field in the table, then would I make yet another field to gather the lineItemID's as return delimited, this will allow us to omit lines if needed. This Returndelimited field is then primary key for your new relation. To the same record...

This does make data appear just as it would have done with your import, except the number of tables have been halved, and by it the place required for storage.

Technical issues exist though, you would need a selfjoin relation to establish the next order/invoice number. The way to gather the ID's from the itemlines is made by the new 8'ish GetNth in a recursive function or by GTRR(SO) into a layout where only the ID's are shown ...from here is it a Copy All Records scriptstep embraced by a setting a global container field to the contents of the clipboard and restoring it again after pasting the data gathered with the Copy All Records.

The result is that it's just as fast as importing, since no data really is moved to a copied location, we're only dealing with relational keys - further more is the data in both the qoutation and the order in sync ...which could prove to be a point in a setup where prices are looked up during changes in price structure.

The issue is that if you have different tables for lineitems would you perhaps have tunneled such as itemtext to both so the itemline only holds ItemID, itemcount, itemprice and foreign key as historic data, but if you hold this in a single table are neither of these 4 tampered with when once entered and your relations def graph is much simpler to dissect later on, what I've added is a itemlineID but they are unlikely to fill as much as the double storage of the 4 needed fields would.

--sd

Posted

Hi Soren,

The switcing between layouts does not change anything. I even switched between files (have not yet merged mulitple tables into a singe file).

About 95% of the data in the quotation file is not taken into the order file, all of them having to do with calculations and other bagage. In my case it is more efficient to have a second table. This was just an example as I have similar problems with other portals with relations that do not refresh.

What I find strange is, that after the new record and import of data, when I manually go to the file/record in question and click outside one of the fields the screen seems to "refresh" after which the portal >does< show the new record.

jim

Posted

But are there any sorting in either the portals relations def or portal layout??? One drastic change to portal behaviour when 7 can along was that when you leave a portal doen't it scroll back to initial posistion ...which have been a demand from developers for ages, and led to numerous templates as Davor Juretics PortalFix.

But what if you terminate your import script by calling this script without paramters:

If [ IsEmpty ( Get ( ScriptParameter ) ) ] 

    Perform Script [ “Fresher”; Parameter: main::primary ] 

Else 

     Set Field [ main::primary; "" ] 

     Commit Records/Requests 

     Set Field [ main::primary; Get ( ScriptParameter ) ] 

End If 

--sd

  • 2 weeks later...
Posted

Hello Soren,

I have added a "sort records" to both relations at the end of the import script and the table does now indeed show the new record in the portal immediatly after creation/import.

Thanks a million!!!!

jim

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