Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Update Max value in query


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Dec 16, 2017 10:28 AM Last Post By: Mark Williams Threads: [ Previous | Next ]
Mark Williams

Posts: 120
Registered: 5/8/10
Update Max value in query  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 7, 2017 12:31 AM
On first loading an app I open a query ("query 1") which grabs the contents of a particular (usually large) table, but also joins two other tables to obtain an integer value from them and in once case that is a max value.

The app runs a new query (every few minutes or so) "query 2" to obtain any changed data including the integer values from the two joined tables. I then update query 1 with the new data from query 2, but it fails when trying to update the max value from the joined table (I assume it would also fail trying to get the integer value from the other joined table).

The changes to the data in query 1 is never posted back to the database. But I need to keep the data in query 1 fresh (including the max value) so as to populate a tree view which displays the data.

Is there any way to force query 1 to accept the change to the max value field?

On the assumption that there isn't, is there any other way I can store the new value by reference to the particular record and field? I tried to do it via the Field's tag property, before realising that there is a single field object for every record. I could create an object for each tree node which stores any changed data, but I am hoping there is a way of doing this by way of the FDQuery object alone.
Mark Williams

Posts: 120
Registered: 5/8/10
Re: Update Max value in query  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 16, 2017 10:28 AM   in response to: Mark Williams in response to: Mark Williams
The solution is to change the queries updateOptions property so it does no CheckReadOnly
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02