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

Portal rows don't update after duplication


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

Recommended Posts

Posted

Scenario: Running a script that automatically duplicates portal records in a loop, based off whether a field "Continue After Break" is checked.

The solution is a "Time Tracking" DB that allows employees to log their times against certain orders and jobs. I am trying to implement a quick, one button way to log in and out of break, and automatically starting on the job the person was working on before break.

Problem: After the script is run, it appears as if all the portals did not get updated with the new information. Selecting the entire portal row "refreshes" that row to what is really there, but I think it should just automatically update. Puting a Refresh command in my script does nothing for this problem.

I suspect the problem may be related to the fact that I have two calculation-container fields using different colors and covering up unneeded information (see attachment). But I'm not sure. Any ideas? I will elaborate upon request, including posting the entire script.

Mac OS 9.2.2 / FM Developer 6.0v3

portal_example.jpg

Posted

I forgot to mention that I have the portal sort by:

1 Unstarted Job Entries ("blue" line items)

2 Active Job Entries ("green" line items)

3 Finished Job Entries ("gray" line items)

4 Start Time

Sorry if this is a lot of information, but in the past I guess I have been to vague sometimes. I just think it's all a little daunting sometimes!

Posted

To get the portals to update, try any of these techniques:

change into Preview mode, then back into Browse mode

Change portal row -- say, previous then next

exit the record

Posted

I ended up adopting the following Refresh Portal script in my template:

# Only the rows touched or scrolled get updated!

# So make sure you loop through all the rows that fit on a page.

Go to Portal Row [select, First]

Loop

Go to Portal Row [select, Exit after last, Next]

Exit Loop If ["Status(CurrentPortalRow) > 27"]

End Loop

Go to Portal Row [select, Last]

Exit Record/Request

Refresh Window [bring to front]

  • Newbies
Posted

I use a script like Kennedy's. The thing I've found is, you only have to scroll through one more row than the size the portal is set to. So if your portal is ten rows long, you can use Exit Loop If ["Status(CurrentPortalRow) > 10"] and that works, but you still ahve to have the exit after last in case there are less than ten rows (or else the loop gets stuck).

Posted

Exactly... the reason I use 27? That's the largest portal that I could reasonably fit on any layout... so I use the one script for every layout in the file... rather than having a different "refresh" script for each layout... and rather than having to remember to adjust the script if I decide to make the portal one row bigger... and looping through an extra 17-25 rows is not going to be a noticeable performance impact.

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