Refresh Table after editing record in another stack - bumped

Sarah Reichelt sarah.reichelt at gmail.com
Tue Jan 29 17:09:11 EST 2008


> I would like to "refresh" a table of data (loaded using the revDataFromQuery
> command) that is on a parent stack, after editing a record on another
> substack.
>
> The parent stack could possibly be loaded with thousands of records, so I'd
> like to not have to call my "on loadTable" stack script again, but just
> refesh the record in the table, the user just edited. I use the
> revExecuteSQL with UPDATE command to write the record to the table on the
> substack, and then close the stack.
> After closing the substack, that's when I'd like to refresh the parent
> stacks table of data.
>
> Other thoughts about this: There needs to be applied the possible multi-user
> environment to this, where more than user maybe editing these records as
> well. That's where refreshing the complete list is good.
>
> What's the best approach for this kind of application, editing a record from
> a list and refreshing that list after changes?
> Any sample applications that someone may have would be appreciated too.


It seems that if you have a field of data and one line needs to be
changed, could you not just do something like:
  put newData into line x of field "MyData"

The relevant line might be already selected, or you might have to get
the lineOffset of the original data to work out which line of the
table field to update. So long as you make sure to save the change to
the database separately, then I can see any problems with this
approach.

Sarah

P.S. I never use "table" fields as such, so there may be wrinkles to
this that I am not aware of. Also, I always do my SQL stuff manually,
not using the Database Query Builder, but if you have linked the table
field to a query, is this going to update the field automatically when
you change the database?



More information about the use-livecode mailing list