Creating an in another table

Please view the video:

Thanks

As you noticed, actions are linked to the table. So to perform a Set Column action on the account table from a screen attached to the operation table, you need to create a single relation linking the operation table to the correct row in the account table. The you can perform a Set Column action through the single relation.

Since it looks like you are moving the value from one column to another in the same table, you may also need to create a lookup column in the operation table that first retrieves the single value column from the relation to the account table, and then that will be what you use in the action.

1 Like

Wow, I was hoping this system’s power would be much more straightforward than this. In other words, I was hoping the power Glide would allow the creation of an action from place in the system. However, that is not possible.

If I am not asking too much, please give me a brief demo of your first paragraph. Thanks.

If you think about it, Glide has to know which row you want to update. The way you were trying to set it up meant that you were just choosing the Account table. How would you indicate which row to update in that table? That’s the purpose of creating a single relation, so you can direct an action from the current row you are on in the operation table to a specific row in the account table.

Might be easier to talk through this back and forth. My first question is, does your account table always have one row, or can it have multiple rows where each can somehow be linked with the specific operation you are viewing?

Does that mean I would may have to insert a row in both tables with matching data?

I’m just asking to help me understand how your data is set up. That will determine how we proceed. Will the Accounts table ever have more than one row?

Well, the relation I made between the two tables would be the current date. Now that gives me one row in the Account table and several rows in the Operating table. My goal is to simply update the ending balance in the Account table to the Beginning Balance. The action does work but I would like to use one screen to do this.

The other question is how would I know the two tables are linked?

A relation or query creates a link. If a relation or query is not empty then you know there is a link, but lets not jump ahead yet. You still haven’t really answered my question. Will the Accounts table EVER have more than one row? I’m not worried about linking stuff up yet or updating data. I just simply want to know if that table can ever have additional rows added to it in the future.

I am sorry. The answer to your question is no. The Account table is designed to have one row.

Ok, that helps to simplify things. You won’t need to create a relation.

  • First create a Single Value column in the Operation table, point it to the Account table and select ‘Whole Row’ instead of an individual column. This is essentially the same as creating a single relation without the need to specific which columns need to match in each table.
  • Once you have that single value column set up, create a Lookup column that will retrieve the ‘Curr Bal OP’ column from the Single Value → Whole Row column you created above.

Now you should have a link in the operations table to the accounts table and you should have the current balance brought into the operations table.

Okay. Hmmmmmmm, allow me to study this logic first.

Now, let’s go back to the Button on a screen pointing to the Operating Table. How do I create an action on that screen that will point to the Account table?

Now you should be able to create a new action for that button that will still be linked to the Operation table. When you add the Set Column action, you should now be able to choose the ‘Single Value → Whole Row’ column as the row source instead of ‘This Item’.

Another video. I hate to bother you.

You are really close. You are doing everything correctly, but you missed one step. Your Lookup column needs to pull the value from ‘New Column H’, so it will be a single value. You are still pulling from the entire Accounts table, so it ends up being a lookup array. Arrays cannot be placed in something that can only hold a single value.

Fix that lookup column and everything else should work out.

(No worries about bothering me. The videos are helping immensely)

Is this correct?

Jeff

No, you should be using New Column H directly. You are trying to get to it through a relation. You are already in the operations table, so you don’t need a relation or anything special to get to column H. It’s right there in the same table.

For now I am going to take a little break.

1 Like

Rather than you Lookup column showing Relation -> Column H it should be showing Column H -> Curr Bal OP. Sorry, I wasn’t clear on that.

Jeff, if I do not get this figured out, I am going to see how I can use two different screens to achieve what I am looking for. No offense to you but this should not be this involved just to do an update. My action works but I have to do it on two different screens. This would confuse a user. I am going to hang in there. Thanks.