Why does the Input display name change when I modify a piece of data?

Hello everyone, today I have a question about the beta function, INPUT().

In an app, I need to request items using INPUT(), which prompts me to enter a quantity of items (1, 2, …, n) — it doesn’t matter the exact amount.

I also have a column that contains the stock of that item, which limits the maximum amount that can be requested.

What I want is for the INPUT() to display as a display name like “Quantity to request (Maximum 1),” for example, which in terms of an expression would be:

CONCATENATE("amount to request (max ", [stock])

This works; however, I don’t want this title to appear in the table view. So, I’ve set up a simple expression like this:

IF( CONTEXT("ViewType") = "Table", "Requested amount", CONCATENATE("amount to request (max ", [stock]) )

This seems to work, but once inside the INPUT(), when the quantity changes, the display name of the column automatically reverts to the table view name. So, instead of saying “Quantity to request (Maximum 1),” it changes to “Cantidad Solicitada.”

Does anyone know what the correct expression should be, or in what context INPUT() functions?

Thanks in advance. Best regards.

I don’t believe there is an INPUT()-specific context. Consider creating a virtual column named (e.g.) display stock with an App formula of [stock], using stock only for modifying the value and display stock for displaying it. Then you could give each a different Display name.

2 Likes

Ok, Steve, thank you very much for your prompt response. I’ll give it a try. I’m grateful to have you active in this community again! You are very valuable to us.

2 Likes

I have tried the following expression, however it did not work. It works in principle and then everything goes back to the same, from any device used. Maybe I should create an idea for the AppSheet team to allow adding warning messages to INPUT().

IF(
[NT],
CONCATENATE(
"Quantity to order (Maximum ",
[I_inventoryDisplayStock],
“)”
),
“Maximum Quantity”
)

Where: [NT] = CONTEXT(“ViewType”) <> “Table”

Thanks anyway friends.

1 Like

The common misconception about the INPUT popup is that it’s a form view - it’s not, it’s something all on it’s own; which means things like Context(“ViewType”) <> “Form” won’t work.

1 Like

Exactly, in fact, it’s a popup that works in the view you’re in—in my case, I was in a dashboard view containing two tables. But regardless, I’m not sure why, but what Steve said is correct. If I point directly to the stock column, it gives an error, but if I create a virtual column, the issue is resolved. Strange, but it works!

Thanks for your contribution @MultiTech

1 Like