on 2025 Feb 03 3:59 PM
Hello,
I am facing an issue when trying to use the MAX formula in SAP Build Apps. I want to get the maximum value from a specific column in my data variable. However, when I try to select a column, I can only choose it from the first row (e.g., data.App1[0].Qty) instead of selecting the entire column (e.g., data.App1[].Qty).
Expected behavior:
Observed behavior:
Has anyone encountered this issue before? Is there a workaround or a correct way to reference an entire column in SAP Build Apps formulas?
Request clarification before answering.
If you want the max of a certain, use a formula like this. I used Northwind's Product entity, and wanted the maximum unit price among all the products.
MAX(PLUCK(data.Employees1,"UnitPrice"))
If you want the records, you can just sort the list:
SORT_BY_KEY(data.Employees1, "UnitPrice","desc")
The returned JSON is not like a database that has the ability to think of the data as rows and columns. It is just JSON, as far as I understand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.