Preventing Duplicate Imports and Handling Data Changes
Hi ALL,
I have an input module where users enter project input details such as Project, Country, Size etc..These two modules are connected through Project 'Libe'.
Users uses a Boolean called 'Import to L2 Page' to import these records to the 'L2 ' page using an action. After the import, the Boolean('Import to L2 page) is automatically unchecked. These two modules are connected through Project 'Libe'.
However, I’m facing two challenges:
- Preventing Duplicate Imports:
- If a user mistakenly selects the same record (e.g., Record R1) and re-runs the import action, it results in a duplicate record on the L2 page. I need a solution to avoid importing the same record multiple times.
- Handling Data Changes:
- If a user updates any field (e.g., Record R1 - size changes from Medium to Small) or (Project changes from Libe to Flux) in the input module, the record should be allowed for re-import to reflect the updated data on the L2 page.
Is it possible achieve this using ISFIRSTOCCURANCE() or any other best approach?
Looking forward for suggestions.
😀
Best Answer
-
Below is the detailed solution that will solve both of your queries.
- Create an IFO Unique Data Line item that will flag records with duplicate data. FORMULA: ISFIRSTOCCURRENT(NAME(Project) & NAME(Country), NAME(Size) ,Records list)
- When you run the process to submit, create an action to snapshot all data into snapshot line items.
- Create a line item (Data Changed?) and put the formula: Project <> Project Snapshot OR Country <> Country Snapshot OR Size <> Size Snapshot
- Create a DCA Write line item with formula: IFO Unique Data OR Data changed
- Use the DCA Write line item as the Write access driver for the Import to P2 line item. This will not allow duplicate entries and only allow it if there is a data change.
1
Answers
-
Oh, I see some typos in the screenshot, it's probably Monday morning, and I am still sleepy.
Please refer the line items and use correct spellings 😄
0 -
@Isha - Hi, 1 way to achieve this is to have the original R1/R2 list as a numbered list & use the #id of that list as the code for the 2nd list.
This way, any record won't be duplicated cause it'd have the unique #id even if the user selects the same record while allowing you to still update any details in module 2 if anything changed in module 1.0 -
@Dikshant,
Thank you so much for your response! Your solution worked perfectly and I was able to apply DCA to restrict users from selecting only new or updated records.I have one more question. I’ve set up an action where, if a new record is selected to move to Page L2, it is added as a new record in the empty slots on L2. The action identifies the empty record IDs on L2 and pushes the selected records from the main module to those slots on L2.
When I run the import, records like R1 and R2 from the Input Module - Test 1 are added as new records on the L2 page. As shown in the screenshot, the size of the R1 record was changed from Medium to Small on main module. I then ran the reimport on the main module, but on the L2 page, R1 was added as a new record instead of updating the existing one. How to prevent this duplication on page L2.
My Ask:
- If a record from the main module is updated, the corresponding record on L2 should be updated instead of being created as a new entry.
- If a new record is added in the main module, it should be inserted as a new record on the L2 page.
- I’ve already added a text-formatted line item 'Record From Test Page' on the L2 page to indicate which records have been imported from the main module. This helps track the source records.
Any suggestions on how to achieve this would be greatly appreciated!
Thank you in advance for your support!
😀
0 -
Create a new line item IMP L2 page CODE, when you submit and snapshot all the attributes, snapshot the Current code line item as well to the IMP L2 page CODE line item. and then update the formula for the current code line item as IF ISNOTBLANK(IMP L2 page CODE) THEN IMP l2 page CODE ELSE exiting formula. It will use the snapshot code rather than finding new code for blank records.
1