AnsweredAssumed Answered

Container field not updating

Question asked by johnswhitehead_1 on Nov 6, 2013
Latest reply on Nov 6, 2013 by philmodjunk

Title

Container field not updating

Post

     Hi

     I have a number of problems using graphics in container fields related to data in other tables. It's a technique I've used successfully in the past but it has come severely unstuck this time.

     I have a table called icons that has two fields, value and icon. It has two records with values 0 and 1 and icons of a red cross and a green tick respectively.

     In other tables (in a very complex database) I have flags that indicate whether a process has been completed. These are set at 0 initially and changed to 1 when the appropriate criteria have been met. Instead of displaying 0 and 1 I want to show the information using the graphics in the icons table so I set up a separate TO of icons for each flag, related to the substantive table by linking the flag field to the value field in the icon record.

     This doesn't work. Specifically, I can change the value of the flag from 0 to 1 or in the other direction and nothing happens to the icon display. I have tried changing the container field's status from optimized for images to optimized for interactive with no effect. I have checked that the calculations of the flags result in numbers not text. I have tried putting Commit records steps into the scripts at appropriate times with no effect. I have Recovered the file but no corruption was found and the new file behaves in the same way. The only way I have found to get the icon to update is to go into Manage Database and perform an action on the icon TO (just moving the graphic of the TO in the relationship table will do the job).

     If instead of setting the flag to zero initially I instead leave it blank, then the icon will update when a value is added. But, weirdly, when this happens to one record in a portal it changes the icon in all (or at least both) records in the portal.

     I have made a very simple database using the technique and it works fine. What is it that's messing with the relationships? 

     The really bizarre thing (that prompted me to do the recovery) is that I gave up and made a container field in the substantive table with a lookup into the icon table via the relationship with the flag. This doesn't work either, with an attempt to relookup the value met with an error to the effect that there are no fields that are looked up via that flag.

     Any ideas? I'm baffled.

     Thanks

Outcomes