Get value by Select Max

Hi, I have a problem that I don’t know how to solve.
I have a query with a select max to retrieve a numeric value and insert it within a text input.
Why does the value not appear in the field?


37

I think you can do this much easier with a regular query instead of a custom query using the formatter.

1 Like

Yes but i have to do a “select max+1” to find a new value, not simply a “max”
And my query works, it’s the result that i can’t use in the form.

You can edit the MAX part of the statement in the query build to add you 1. The aggregate is editable.

Then just add this query to your page. Then in your form field use Dynamic Attribute --> Value and select your binding. Alternatively you don’t even have to add the increment in the query. You can add it in the binding. I think that might be even easier.

What do you mean by can’t use it in the form?

So what’s not working exactly with your custom query? Do you see any result when you run the server action directly in your browser?

The query works perfectly… I can’t insert the value in a text input on my form page.
It doesn’t appear. Look at my first post

38

Can you post screenshots of your Server Connect (API) Action as well as your App Connect Binding?

When posting code from your page don’t add it as screenshot please, paste the code directly in your post as described in:

And also not sure what exactly is not working for you but the expression:

{{serverconnect1.data.custom[0].test}}

is correct, works perfectly fine on my page and returns the correct value on the page:

Stupid me… i’ve flagged “No Auto Load” on server connect properties…

1 Like

Done that a few times … or left autoload on for a logout serverconnect. You are not alone. :wink:

1 Like