Hi, I have a table called "Sites". Child ta

Hi, I have a table called “Sites”.

Child tables to this are

  1. “Site Tests” - Ref is Site Name 2) “Site Orders” Ref is Site Name 3) “Site Payments”

Ref is Site Name

Users enter data in Sites and anybody can create Sites and child table rows as well.

I have seen that users enter data wrongly and new site records (duplicates) are created for the same site. Also for the duplicate sites sites created, some child records are also created.

Can I create a view / form to select the Site Name which is wrongly created and the Site Name to which I want all the child records can be moved to? After the move is done, I will delete the wrongly created one.

I think I can do with Action “Data Execute action on set of rows”, but I have not seen any example on this… If I am right, please share me an example here or you may please suggest how to do this.

0 14 578
14 REPLIES 14

Would it be easier to use the same table and filter records with a slice?

@Aleksi_Alkio, well not easy because there can be many records in child table for a single record in parent.

I don’t see the reason why it would be easier to move your records from one table to another rather than update the value/record in a same table. Maybe it’s difficult because we don’t know your column/table structure well enough.

@Aleksi. I inherited “dirty” data with the same scenario as explained above by @Srikanth_S.
Basically duplicate/triplicate Parents and Children under each of these duplicates/triplicates.
I want to give/change the ParentID of all the Children of all the duplicates/triplicates Parents, to the ParentID that I identified in the Parent table as the NEW Parent going forward.
I am struggling with the solution/mechanism to achieve this.
My thinking was to build a View with Quick Edit and manually type the Identified New ParentID record into the duplicate/triplicate Parent records and then run an update Workflow (somehow) from the Parent Table but that does an update on the Child Table and relevant records with the New ParentID
Then Delete the duplicate/triplicate Parent record(s)

Need some guidance

Are you using spreadsheet as a data source… like a gSheet?

@Aleksi, yes Google Sheet

Hi @Henry_Scott
Would it be quicker to just clean up the GSheet?

I suggest using Find & Replace function in gsheet.

@Marc_Dillon and @Lynn, true, but I need every record to be eyeballed by my Admin Staff that interface with my customers where we also want to validate contact and “in case of emergency” - ICE detail. The Appsheet App UI lends itself to do that and the data cleanup I mentioned to fix the linking of Parent and Children I wanted to incorporate into this exercise. So this is not a backend automated exercise and I am looking for a solution through a combination of the UX and Workflows an Actions

I’m not 100% sure what you are looking for but I’m guessing… You have duplicate records in Parent table (for some reason) and related child records. Now you need to fix these parents records and then it’s child records “Automatically”. Is this assumption correct?

@Aleksi. Yes that is correct. Duplicates are as a result of a Data Migration from another system

Dear Henry,
One solution can be like this.

Add another column to the parent table, named as Temp_Id. Open it in the Google sheet and create values as to get unique values in each row. You can use text+ascending number etc.

Now, go to appsheet, create an app to use this temp id as key column. In the appsheet give it unqiueid() function in initial value. You can add other tables independently, without reference column of parent table.

Use a blank table select a parent table and see related child records using select functions. Do, whatever you like to do.

Then you can do the exercise easily. Hope this helps.

How are you identifying which parent record is the original and which is duplicate? I can imagine a complex select expression to generate a list of duplicate parent keys based on earliest date or lowest rownumber. Are you needing help on this part?

Once you have a list of duplicates, I’d suggest making a slice of the child records that filters by if they ref one of the duplicates. Create a list and detail/form view for these records for the purpose of having a user “eyeball” them and fix them. Once the records are fixed, they’ll automatically remove themselves from the slice. So the slice will act as your “todo list”.

I also imagine an expression can also be built to identify what the original parent should be, and auto-populate that once the user enters the form. Or setting the value can be made into an action button.

That sound like it would work? Need further help with any part?

@Marc_Dillon, food for thought. Let me try this and I will revert if I get stuck

Top Labels in this Space