web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Item saved missing aft...
Power Apps
Suggested Answer

Item saved missing after going next screen/previous screen

(1) ShareShare
ReportReport
Posted on by 111
Hello everyone,
 
I’m experiencing an issue in PowerApps where the button used to save a newly added item doesn't seem to work as expected when navigating back to the previous page or the next page. After adding the item, it doesn't appear to be saved or displayed correctly when revisiting the screen.
There are six screens responsible for handling the display of the item:

- `galCAR/OFI` – To display after adding a new item
- `galCAR/OFI_New`
Patch(
    colNCR,
    Defaults(colNCR),
    {      
        Re_x002d_Occurence: DataCardValue12.Selected.Value,
        Remarks:DataCardValue96.Text,
        NCFound: DataCardValue5.Selected.Value,
        Clause: Dropdown1.Selected.Result,
        Sub2: Dropdown3.Selected.Result,
        Sub3: Dropdown2.Selected.Result,
        Nonconformity: DataCardValue23.Text,
        FindingsForNonConformity: DataCardValue59.Text,
        EvidenceForNonConformity: DataCardValue24.Text,
        NCRNo: DataCardValue70.Text
    }
);
Patch(
    colNCRProcess,
    Defaults(colNCRProcess),
    {
        NCFound: DataCardValue5.Selected.Value,
        Clause: Dropdown1.Selected.Result,
        NCRNo: DataCardValue70.Text
    }
);
Set(
    varIncrement,
    varIncrement + 1
);
ResetForm(frmIQA4);
Navigate('galCAR/OFI')

- `galCAR/OFI_addafteraSave`
Patch(
    'Create NC Report',
    Defaults('Create NC Report'),
    {
        Department: DataCardValue50.Selected.Value,
        Clause: Dropdown1_4.Selected.Result,
        MasterID: Gallery1.Selected.ID,
        'Re-Occurence': {Value: DataCardValue12_4.Selected.Value},
        'NC Found': {Value: DataCardValue5_4.Selected.Value},
        'NCR No': DataCardValue70_4.Text,
        'Sub 2': Dropdown3_4.Selected.Result,
        'Sub 3': Dropdown2_4.Selected.Result,
        NonconformityObserved: DataCardValue23_4.Text,
        FindingsForNonConformity: DataCardValue59_4.Text,
        EvidenceForNonConformity: DataCardValue24_4.Text, 
        'Re-OccurenceRemarks': DataCardValue96_2.Text,
            Section: DataCardValue170.Text,
            'QMS No': Concat(
                DataCardValue78.SelectedItems,
                Value & ","
            ),
            Team: DataCardValue76.Text,
            Status: {Value: "Save as Draft"}
            

    }
);


Set(varSpin, true);
'PowerAppsbutton-2'.Run(Gallery1.Selected.ID); Refresh('Create NC Report'); 

- `scrDetailsCAR/OFI1_Eff`
Patch(
    'Create NC Report',
    LookUp(
        'Create NC Report',
        ID = galNCR2.Selected.ID
    ),
    frmIQA4_2.Updates,
    {
        Clause: Dropdown1_2.Selected.Result,
        'Re-Occurence': {Value: DataCardValue12_2.Selected.Value},
        'Re-OccurenceRemarks': DataCardValue96_1,
        'NC Found': {Value: DataCardValue5_2.Selected.Value},
        'NCR No': DataCardValue70_2.Text,
        'Sub 2': Dropdown3_2.Selected.Result,
        'Sub 3': Dropdown2_2.Selected.Result,
        NonconformityObserved: DataCardValue23_2.Text,
        FindingsForNonConformity: DataCardValue59_2.Text,
        EvidenceForNonConformity: DataCardValue24_2.Text
    }
);


Navigate('galCAR/OFI1_EffandAuditee')

- `galCAR/OFI_Edit`
Patch(
    'Create NC Report',
    LookUp('Create NC Report',  MasterID = Gallery1.Selected.ID And 'NCR No' = galNCR.Selected.'NCR No'),

     {Clause:Dropdown1_1.Selected.Result,
     'Re-Occurence': {Value: DataCardValue12_1.Selected.Value},
     'Re-OccurenceRemarks': DataCardValue8.Text,
     'NC Found':{Value: DataCardValue5_1.Selected.Value},
     'NCR No': Replace(LookUp('Create NC Report',  MasterID = Gallery1.Selected.ID And 'NCR No' = galNCR.Selected.'NCR No').'NCR No', 1, 3, DataCardValue5_1.Selected.Value),
     'Sub 2': Dropdown3_1.Selected.Result,
     'Sub 3': Dropdown2_1.Selected.Result,
     NonconformityObserved: DataCardValue23_1.Text,
     FindingsForNonConformity: DataCardValue59_1.Text,
     EvidenceForNonConformity: DataCardValue24_1.Text 
     }
);
Patch(
    'Create NC Report - AM',
    LookUp('Create NC Report - AM',  MasterID = Gallery1.Selected.ID And 'NCR No' = galNCR.Selected.'NCR No'),
    //galNCR.Selected,
     {Clause:Dropdown1_1.Selected.Result,
     NCRFound:{Value: DataCardValue5_1.Selected.Value},
     'NCR No': Replace(LookUp('Create NC Report - AM',  MasterID = Gallery1.Selected.ID And 'NCR No' = galNCR.Selected.'NCR No').'NCR No', 1, 3, DataCardValue5_1.Selected.Value)
     }
);

ResetForm(frmIQA4_1);
Navigate('galCAR/OFI')

- `scrCAR/OFI_EditBfrSubmit`
Patch(
    colNCR,
    LookUp(colNCR, NCRNo = galNCR.Selected.'NCR No'), {
        Re_x002d_Occurence: Dropdown5.Selected.Value,
        Remarks:DataCardValue8_1.Text,
        NCFound: Dropdown6.Selected.Value,
        Clause: Dropdown1_3.Selected.Result,
        Sub2: Dropdown3_3.Selected.Result,
        Sub3: Dropdown2_3.Selected.Result,
        Nonconformity: DataCardValue23_3.Text,
        FindingsForNonConformity: DataCardValue59_3.Text,
        EvidenceForNonConformity: DataCardValue24_3.Text,
        NCRNo: DataCardValue70_3.Text }
);
Patch(
    colNCRProcess,
    LookUp(colNCRProcess, NCRNo = galNCR.Selected.'NCR No'),
    {
        NCFound: Dropdown6.Selected.Value,
        Clause: Dropdown1_3.Selected.Result,
        NCRNo: DataCardValue70_3.Text
    }
);


ResetForm(frmIQA4_1);
Navigate('galCAR/OFI')
 
 
The code for Finding after user added an item is below for all screen but the DataCardValue5 will be changing for each screen
If(DataCardValue5_1.Selected.Value = "CAR", "CAR" & varIncrement & "/22", If(DataCardValue5_1.Selected.Value = "OFI", "OFI" & varIncrement & "/22" ))
But different for scrCAR/OFI_EditBfrSubmit
If(Dropdown6.Selected.Value = "CAR", "CAR" & varIncrement & "/22", If(Dropdown6.Selected.Value = "OFI", "OFI" & varIncrement & "/22" ))
 
I'm wondering if the issue might be related to how the button is connected, possibly to Power Automate. Is it possible that the flow isn't being triggered, or is there a step missing in the process? 
 
Thank you in advance!
 
Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,615 Super User 2026 Season 1 on at
    hey
     
    i havent gone thru all the code of your, but nearly every code snippet includes ResetForm() function at the bottom. This will result in a Reset.
     
    Maybe it would be better to only use the Reset function at the very end (or maybe before you navigate to the screens with the forms)?
     
     
    if it helped please mark as verified answer
     
    thanks in advance
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi
     
    What is the data in the Form Item property? Where does it come from? A variable? a gallery? etc.
    It appears to me that you are overwriting the value you are using in the Items property once you move forward, so that it will then not do a lookup properly on it when you go back.
     
    Please share that
    Thanks!
  • azni Profile Picture
    111 on at
    Item property use in this case is a SharePoint list 'Create NC Report' after they click the Save button
     
     
    Then, the item saved will be on this gallery and the data will be store in a collection
    If(Entry = "New", colNCR, Filter('Create NC Report', MasterID = Gallery1.Selected.ID))
     
    ColNCRProcess

    colNCR
    - Will appear if I am not navigating to the next page

     
    I am sorry if the information given is incorrect, feel free to ask for me, I am not familiar with Power Apps. Thank you!
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 538

#2
WarrenBelz Profile Picture

WarrenBelz 420 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard