Refresh Table after editing record in another stack - bumped

mfstuart mfstuart at cox.net
Tue Jan 29 19:52:03 EST 2008


Thanx Sarah, I'll try that script.

But with a multi-user environment, I think I'll have to call my "loadTable"
handler again, as other users may have updated records in the same list as
another user.

Which gets me back to: how do I call a script in a parent stack from a
substack?
I'm trying this now and I get an error: handler not found. I'm assuming the
substack doesn't know the script in the parent stack exists. Is this where
you have to put scripts into the FrontScripts? Not sure.

P.S.
I populate my table field lists with the revDataFromQuery command.
If you don't use table fields, what do you use to display lists in?

Thanx,
Mark Stuart



Sarah Reichelt-2 wrote:
> 
>> 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?
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 

-- 
View this message in context: http://www.nabble.com/Refresh-Table-after-editing-record-in-another-stack---bumped-tp15168712p15173277.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list