How can I add a numbers input field with a different data destination than the screen's table?

Hi folks!

Here’s an explanation of the bug I’m running into (4 min):

I need the screen to relate to a certain database table (because that’s where I’m storing the data that will determine whether to show or hide other elements on the page), but I want to use a numbers field that doesn’t have anything to do with that table and save the data to a different, unrelated table.

How can I add just a numbers field—unrelated to any specific data source?

If I use a Form Container, I can seemingly write to any “Target Table” I want. But somehow if I use a regular Container, I’m stuck with whatever table the current screen is related to.

I didn’t watch your video because I need to be quiet here and I don’t have headphones.

The general gist is that it can be a good idea to clearly separate tables that are used as the source of collections from tables that are the source of tabs. You can also move data around from table to table with relations (if the tables are related) or with lookups and single value columns. Even when tables are functionally unrelated in the application, you can artificially create common data such as row indexes to move data around.

I hope these general ideas might help. I might watch your video tomorrow, I’m curious.

1 Like

I didn’t listen to everything. Have you ever tried using a custom collection? This component can display the target table in the current table. Is this what you want?

The number entry component needs to be targeted at a column - there is no getting away from that. I guess my question would be what are you doing with the entered value? ie. what is the action on your “Upgrade” button doing? You didn’t explain that in your video, and that’s probably the most important point - as presumably that is where you will want to use the entered value?

It seems to me that the functionality you are looking for here is that which you get with a Custom Form, and you’re kind of halfway there…

The reason you don’t see an option to set a default with the Number entry is because you’re using it outside the context of a form.

1 Like

Thank you, Darren! This is very helpful. I’ll copy your Custom Form app now and see if that can take me further.

Basically on that screen, I want to read from the Teams table (to know how many invites they have left), but for that particular form with the number selector, I want to write to the Payments table, because the upgrade action is going to trigger the creation of an invoice in Stripe. In another form on that screen (only displayed if they already have invites left to “spend”), I want to write to the Users table, because they don’t need to upgrade, they’re ready to invite users.

Do you have something in the table that identifies the team?
If yes, use that to build a single relation to the Teams table, and then use a Lookup to fetch the value you need.

What you should do is add a User Specific column to that table to temporarily hold the input value, then use that in an Add Row action when the user submits.

1 Like

Do you have a video explaining the Custom Form application? When I’m editing that app, I don’t see any way to access the shopping cart. Is that the Custom Form that you’re referring to? Or do you mean the idea of turning a “Detail Screen” into an editable form?

I don’t, sorry. And that Concept App is really old. It’s a Classic App, so I’m not even sure if it can still be copied - I suspect not.

But your use case is fairly simple. All you really need is that single user specific column, as far as I can tall.

2 Likes