Hello,
I am attempting to access data (One column of integers) in a view in the cloud database. My goal is to pull the data and then iterate through it to identify the largest number. I have found different functions that allow me write and/ or delete data from the database, but none that would allow me to pull/ access specific columns of data. Does this exist? Or must I use a different approach?
Thanks in advance...
Discussion posts and replies are publicly visible
There are a few methods for achieving this, as is often the case with Appian it really depends on why you're trying to do it. You could create another view and use the MySQL max() function (probably the most performant and scalable approach. Or you could just query the column, sort descending and return the 1st result by controlling the pagingInfo attributes. Iterating through an ever growing list of numbers within Appian would not be on most peoples lists of approaches.
Read up on some of the basic concepts of the a!queryEntity() function and Appian's query builder wizard here:
https://docs.appian.com/suite/help/19.4/Querying_Data_From_an_RDBMS.html
https://docs.appian.com/suite/help/19.4/using-the-query-editor.html