Having trouble in button actions. If anyone can help

Can you try something and change the condition for the Add button to not check for empty. Only check for 0. If my suspicion is correct, the Add function should break completely. I think your action IF logic is looking at a value that doesn’t change, so only your add condition is only hit once and none of the conditions are ever met again.

I suspect that it is because you are inside a form. The action is most likely checking an underlying value in the table and not what you have in the entry component. That entry component doesn’t write anything to the table until you submit the form. In some cases, you can access screen values, but I’m not sure if that’s possible within an action.

I usually don’t attempt to do anything beyond the scope of what a native form is supposed to do, such as place a form within a form, or perform any actions while inside the form. I guess you could try writing to, and accessing the number column from, a user profile row. But I think I would just use a choice component instead to set the number in the new row that will be added, and the conditionally show what you need based on the screen value of that number.

3 Likes