How to copy values from a row to another table in multiple rows

Good day to all,

I'm stuck in the following. Hope to get a solution.

I would like to copy values from multiple columns in Table: Hole 1 to multiple rows in Table: Scorecard, upon clicking SAVE button.

For example: From Golfer 1 in Table: Hole 1 to H1 in Table: Scorecard (Selected/Filtered dataset based on the Game No.). Follow by, From Golfer 2 in Table: Hole 1 to H1 in Table: Scorecard. And continue.

 

 

kklee_2-1732590435568.png

 

kklee_4-1732590519286.png

 

Thanks in advanced.

0 6 175
6 REPLIES 6

Why not just enter the values into the Scorecard table first?   Then use that to extract the specific Game and Hole information.

Hi WillowMobileSys,

Thanks for your reply.

Coz, I would like user to key in the score Hole by Hole, in Form Type.

For example:

kklee_0-1732695971532.png

Once user entered all the scores for the number of golfers, and clicked SAVE, then would like the scores to be copied into the Scorecard table accordingly.

You can make H1...H18 virtual columns and enter below to automatically update values.

For Column H1, enter
SWITCH([Golfer],
 1, ANY(SELECT(Hole1[Golfer 1], [Game No] = [_THISROW].[Game No])),
 2, ANY(SELECT(Hole1[Golfer 2], [Game No] = [_THISROW].[Game No])),
 ..
 0
)

For Column H2, enter
SWITCH([Golfer],
 1, ANY(SELECT(Hole2[Golfer 1], [Game No] = [_THISROW].[Game No])),
 2, ANY(SELECT(Hole2[Golfer 2], [Game No] = [_THISROW].[Game No])),
 ..
 0
)
....

If you want to use persistent columns then you need to implement a mechanism to update the relevant Scorecard rows to force recalculation. 

Hi TeeSee1,

Thanks for your suggestion. I've tried it out and it was workable in another way.

But, is there any way if I would like to stick to my initial table design?

FYI, Table: Hole 1 .... Hole 18 holds the scores temporarily. Once the round completed, the scores will be deleted. All the scores should be hold in the Table: Scorecard permanently.

Thanks in advanced.

https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Expression-to-recalculate-all-rows-in-a-table-c...

This q&a and other related posts with the keyword 'forced recalculation' should help you.

Thanks TeeSee1.

I'll take a look at those. Hopefully will be able to get the solution from there.

Top Labels in this Space