Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

No item to display in preveiw screen when default mode is NEW

(1) ShareShare
ReportReport
Posted on by 909 Super User 2024 Season 1

Hi,

 

I am getting the no item to display in my preview screen . Ive looked online for solutions and i have changed the default mode is new.

wonka1234_0-1693947210278.png

 

I submit both forms. Seems like I have to exit out of preview mode then resubmit to get my 2nd form to be submitted.

My 2nd form is linked to datacards in my first form. 

 

when outside of preview i see the values fine. - 

wonka1234_0-1693947395984.png

 

Action History Default property - DataCardValue1.Selected.Value   - which is the value of Action from Editform1.

Date History Default property - DataCardValue2.SelectedDate - which is the value of Date from EditForm1

 

 

Any fix to this? 

 

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: No item to display in preveiw screen when default mode is NEW

    @poweractivate  when in my 2nd form, item property - I put gblRecordID_B but get error "Name isnt recognized, 'gblRecordID_B' isnt recognized'  😞

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    Re: No item to display in preveiw screen when default mode is NEW

    @wonka1234 Probably not, you may want to try to use a different one, such as gblRecordID_B to be specific to the one for Data Source B

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: No item to display in preveiw screen when default mode is NEW

    @poweractivate  So my editform1 has the item property - LookUp('DataSource A',ID = gblRecordID)

     

    and i copied that same for my 2nd form - LookUp('Data Source B',ID = gblRecordID).

     

    Should these be the same record ID variable? 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    Re: No item to display in preveiw screen when default mode is NEW

    This may also help:

    Setting up the DefaultMode: You can conditionally set the DefaultMode of the form to FormMode.Edit or FormMode.New based on whether gloCurrentItem is blank.

     

    If(IsBlank(gloCurrentItem), FormMode.New, FormMode.Edit)
    

     

    This should set the form mode to "New" if gloCurrentItem is blank, and to "Edit" if it's not.

    Put this in the App OnStart if needed:

     

    Set(gloCurrentItem, Blank())

     

    Then click ellipses to right of App --> Run OnStrat to simulate running app from beginning while still in editor. 

     

    Adjusting OnSuccess: In the OnSuccess property, update gloCurrentItem as I have already suggested.

     

    Set(gloCurrentItem, Self.LastSubmit)
    

     

     

    Resetting the Form: If you are using a button to submit, consider resetting gloCurrentItem to blank when you want to insert a new record, with a reset button, on its OnSelect property:

     

    Set(gloCurrentItem, Blank()); NewForm(YourFormName)
    

     

     This will allow the form to be ready for a new submission since gloCurrentItem will be blank and DefaultMode will revert to FormMode.New.

    And then I assume you already have a Submit button whose OnSelect may be:

     

    SubmitForm(YourFormName)

     

     

    See if it helps @wonka1234 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    Re: No item to display in preveiw screen when default mode is NEW

    @wonka1234 

    In the Form Item property you may need a variable, such as gloCurrentItem
    So then in the Item property of your Form, put this formula:

     

    gloCurrentItem

     

    In the OnSuccess property of same Form, you may need to use formula

     

    Set(gloCurrentItem,Self.LastSubmit)

     

    somewhere in there.

    Then the last submitted item may show on the Form after submission.

    See if this may help further @wonka1234 

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: No item to display in preveiw screen when default mode is NEW

    ok seems to help. So I submitted and saw the record int he form. Now AFTER the submit I see the No item to display. why After the submit I cant see it?

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    Re: No item to display in preveiw screen when default mode is NEW

    @wonka1234 

    If you have formulas in OnStart these never run in the Power Apps Editor automatically,

    you need to manually click Run OnStart each time in the editor. Here are the steps below:

    1. Click on the ellipses to the right of the word App
    2. From the menu, click Run OnStart

    3. Then enter preview mode.
    4. Repeat the above steps each time you want to pretend you are starting the app from the beginning in the Power Apps Editor.
    poweractivate_0-1691255080659.png

     


    See if it helps @wonka1234 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,708 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,030 Most Valuable Professional

Leaderboard