Copying Cells in an Action

Hi.

I am trying to copy some data from cell A to cell B via an action, but having some difficulty. Regardless of what I have tried so far, cell B below always keeps the value it had before the action is launched.

Cell A is a text field that is auto-populated based on an app formula and has no other expressions applied to it directly.

Cell B is a text field that expects user entry from the app and has data validity and show_if rules applied.

Cell A data will always be valid for cell B.

I have a group action that when activated will call two sub-actions. Sub-action 1 copies cell A to cell B. Sub-action 2 directs the app to the view that contains cell B. Sub-action 1 never seems to fire.

TIA for any assistance.

Could you post your Table and Actions in pictures? with the formula?

2 Likes

To add a bit more clarity, When I access the view “Edit MAC” I want the value of MAC Address to copy into MAC Entry so that if they are editing a typo they don’t have to type the entire thing form scratch again.

Actions

Table
The actions are dealing with the MAC Address and MAC Entry fields.

MAC Address details and Auto compute expression


MAC Entry details

I’m pretty sure a navigation action terminates a grouped action. The copy action isn’t being run.

I have also tried running it with the copy action first before the navigation and still no joy.

Any thoughts on other ways to setup so that when the edit button is pressed that it performs the two actions (copy then navigate)?

The copy action is actually copy-and-edit, so it still counts as a navigation action.

Rather than using an action, perhaps you could set the Initial value expression for Column B to [Column A] and set Reset on edit? to ON. Then, whenever the row is modified, Column B will first be reset to the current value of Column A before the user can make changes.

Thanks @Steve, but that doesn’t work either. Give a “circular data” error. The value of cell A is derived from the value of a third cell, C, and C’s value is derived from B.

I don’t understand how this counts as navigation, nor why a navigation would stop commands from executing. To be clear, when the copy action is setup as first in the group, the navigation action still fires, so I don’t think the copy action is halting the processing.

Because the -and-edit part of copy-and-edit involves navigating to the form view to -edit.

That’s just the way it is.

Yep, because the copy happens first. But nothing beyond the navigation does.

There are two actions involved in that group. I have it setup like this:

Action 1: Copy the cell
Action 2: Navigate to a view

Now when this grouped action is run, Action 1 does not successfully happen, but Action 2 does. So if copying the cell stops the grouped action from continuing, then it is obvious that the copy is never happening.

When Action 1 runs, there is no visible change to the UI, no navigation to a form page, so I am unclear as to what you mean here. How does copying include navigation if no navigation happens?

Hey Steve, it pays to go back and look at the screenshots already posted!

1 Like

OK, now I feel silly. While I was trying to get this to work, at one point I changed the copy thusly:

Cell A = [_THISROW].[CellB]

When I changed it back to simply: [CellB] it is now working.

There were likely other changes made in trying to make this happen that also “fixed” whatever I had broken.

Thanks to everyone who chimed in. I’m not sure where to mark a “solution”, but I have this working properly now.

@Steve both the copy and navigate actions are firing now.

1 Like

Whew! Good catch!