It is currently Wed Sep 17, 2014 5:37 pm

Post new topic Reply to topic  [ 2 posts ] 
 Navigation and dataset question 
Author Message

Joined: Tue Jul 03, 2007 5:18 am
Posts: 322
Location: PA
Post Navigation and dataset question
I have a table on a screen title 'Production Standard by Customer' At the bottom of that screen I have an edit button and an add button. Both of these buttons with bring up a popup type of screen where the user can either add a new record or edit the current record.

Currently the way in which I am doing thing is when I select a record from the table I will press the button for edit and it will open the popup menu and fill the proper values into their respective cell. Once I have updated the record I will press the submit button and it will write the data to the table. Then I have a DB tag in SQL tags that I write to when closing the popup screen. On the 'Production Standards by Customer' Screen I watch this tag. When the tag goes to a 1 (one) I preform a db.reFresh on the table and then reset the tag to a 0 (zero).

I am wondering, is this the best and most efficient way to accomplish this? Currently the table is set to polling off.

Tue Apr 17, 2012 7:12 am

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 1982
Location: Sacramento, CA
Post Re: Navigation and dataset question
You can simply call the refresh function on the popup window when the user presses the save or add buttons. So rather than writing to tags you can do the following:
    win = fpmi.gui.getWindow("WindowNameWithTable")
    fpmi.db.refresh(win.getRootContainer().getComponent("TableName"), "data")
    pass # window not opened, shouldn't get here unless window is closed

Travis Cox
Inductive Automation
Technical Support Rep.

Tue Apr 17, 2012 7:22 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: