1 of 1 people found this helpful
Are these fields that fail to show data from a table occurrence different from that specified in layout set up as the "show records from" table occurrence?
The summary fields are a combination of totals and weighted averages. They are all based on fields of the same table occurrences as the list view layout. The <<Field_Name>> textboxes are unstored basic calculations basic like record count etc.
1 of 1 people found this helpful
Sounds like you have a record open for editing. Can't tell from here if this is possible and if so, why. But if there is any chance that this is the case, you might try using Commit Records in your script to see if that helps.
When a layout fails to refresh as needed, I usually consider the following "fixes" in the following order
- Commit Records
- Refresh Object
- Refresh Portal
- Refresh Window
- Refresh Window [Flush Cached Join Results]
1 is the "cheapest" fix if it works. 2 and 3 only help in certain specific situations and probably don't apply here. If I have to use 5, I then rethink my design to see if I can find a way to get things to update without it as this step can add quite a bit of "load" in terms of responsiveness/system performance.
You might also try creating a brand new layout with no elements copy/pasted from your current layout to see if you get the same behavior. It's not real common, but sometimes a layout gets "munged" and doesn't perform as it should. In such cases, replacing the layout can fix the problem. (And you don't want to copy/paste layout objects from the damaged layout as you may copy over the damage to the new layout.)
Yep the recreation from scratch of the layout was something I was going to try.
I have another layout which is almost identical and swapping startup to that one doesn't seem to make any difference same problem (this one was working fine as well). I've tried the commit record script and that hasn't worked. Haven't tried #2 or #3 as no portal and not really elegant albeit I could try just refreshing one object to see if that refreshes the rest. #5. Also tried this and first time I tried this it refreshed the <<FIELD>> textbox but the other summary fields which were off screen weren't refreshed when scrolling right.
Create a brand new layout with just one field and one summary field in the trailing and it is exactly the same with the summary not loading but refreshing when I go to another record.
What you describe is not typical behavior for a summary field from the same occurrence as the layout. It can be an issue with a summary field from a related occurrence--especially one that is "several hops away". Are you sure that this is not the case here? Please note that a table and a table occurrence are not the same thing.
Perhaps a screen shot of your layout, captured while in layout mode, might be informative here.
Here is a layout I created. Table Occurrence is Portfolio_All and all fields are from that. Total Facility and ID are both number fields (ID Count is just a count and the other is a just a total). When I first load up they are blank and this was a newly created layout with no copied fields. If I do a search or change the selected record it then refreshes the values? Commit scripts and refresh have been tried again and nothing works.
Bit stumped now as to what else I can try and why these aren't working?
When I first load up they are blank
What is your found set at that point?
The other way you could have these fields empty is if you have a found set of zero records.
If that's not the issue, I'd recover the file and test the recovered file just to rule out problems with the file itself.
No I have definitely got a found list and that is all working fine and displaying correctly.
File recovery is my next option. I'll do the recovery on a backup and see if that sorts this out first.
Ran a recovery and unfortunately it is exactly the same? Any other suggestions from anyone?
Not really sure if I have anything else I can try?
Hmmm, what view are you in when you see this?
Form, List or Table View?
What I keep running up against is that this is a very simple basic layout and yet what you report is not the expected behavior for such a table, the fields shown or the layout.
I've attached a sample file where I've tried to replicate your design from what you've posted, but it, as expected, does not replicate the results that you report.
Please look it over and let me know what might be different between it and your file.
You might also post the script that runs when the file opens.
On the other hand, after re-reading your original post, I have one really silly question to ask:
Are you sure that you are in Browse mode when you see these fields empty?
Summary Field Issue.fmp12.zip 122.1 K
Yep that works I've tried doing a simple start up and that has solved it. I've realised that the issue was at the end of the script I have a few toggle fields that are reset/set to default value and this appears to have caused the issue if I run these set field requests before I do the sort of the list view it shows all the summaries fine. Thanks for the help!