Advanced Query Question

Advanced Query Question

  
Hello All,

Very new to the platform and still learning.

I have an advanced query that uses CASE so set a variable and it needs to update a field in a table.  The select portion of the query works as intended, but when I add the UPDATE portion the query test simply says that no rows were returned and the update fails.  The complete query works when run directly on the database.  Is it possible to update a table with an advanced query and it's just a matter of getting the correct flow/widgets in place, or is this something that is not supported?

Thanks,

Alex
Hi Alejandro, 

When testing an advanced query in Service Studio (with the test button) the transaction is not commited, meaning, it won't update any record.

Only after you deploy the application you'll be able to see the results in the database.

Cheers,
RNA 
Hi Alejandro,

First of all welcometo the community.
In an advanced query you can run all the common SQL operations, but sometimes with a special care (if I understood it well - can you show me the query).
However, is that any reason not to use logic (beside SUs consumption)?

Best Regards,
Gonçalo Martins
Ricardo Araújo wrote:
Hi Alejandro, 

When testing an advanced query in Service Studio (with the test button) the transaction is not commited, meaning, it won't update any record.

Only after you deploy the application you'll be able to see the results in the database.

Cheers,
RNA 
 
 Hey Ricardo,

I've deployed the application but still no joy.  By the sound of it, I'm missing a step or 3.  The query works so it's just a matter adding the correct steps to make it update the table.  I've created a new screen action with the query in it.  No other steps in the screen action.  The screen action is called by a button with method submit and destination the screen action.  After looking at all the steps I added to get a multi select combo box to work, my quess is that I'm missing a few steps in the screen action.  Any thoughts?

Alex
Gonçalo Martins wrote:
Hi Alejandro,

First of all welcometo the community.
In an advanced query you can run all the common SQL operations, but sometimes with a special care (if I understood it well - can you show me the query).
However, is that any reason not to use logic (beside SUs consumption)?

Best Regards,
Gonçalo Martins
 
 Thanks Gonçalo,

I've attached a pic that shows the query in my response to Ricardo.  The reason... Ignorance for the most part.  I've figured out what SUs are, but have no clue why an advanced query would consume more/less of them.

Alex
Alejandro Kauffmann wrote:
 
 Thanks Gonçalo,

I've attached a pic that shows the query in my response to Ricardo.  The reason... Ignorance for the most part.  I've figured out what SUs are, but have no clue why an advanced query would consume more/less of them.

Alex
 
Hi Alejandro,
About the Software Units you can see all the information on this document:
https://www.outsystems.com/community/download.aspx?DocumentId=755

About the query..I gave a quick check and it seems to be fine..
What is the error/information you get?
To check it in development mode, directly in the Adv. Query editor write after your query this:  commit ;
This way you can check the behaviour and the SQL command result.

Alejandro, 

can you share a print screen of the datamodel diagram?

Ricardo.
Ricardo Araújo wrote:
Alejandro, 

can you share a print screen of the datamodel diagram?

Ricardo.
 
 Sorry for the delay.  I went in a different direction and this is no longer an issue.  Thanks for your time.

Alex