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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Preview Mode and Produ...
Power Apps
Unanswered

Preview Mode and Production

(1) ShareShare
ReportReport
Posted on by 237

Hi,

 

I have an app where in preview mode all of the fields display their values, but when published to production, the app is missing values in one of the fields. The values successfully patch to the list, and they are also visible within the preview mode of the app, however, when in Prod, they disappear. See both screens below

 

Preview Mode:

NPatel12498_0-1708121448768.png

 

Production, you can see the per diem rates are missing:

NPatel12498_1-1708122760828.png

 

Categories:
I have the same question (0)
  • Robu1 Profile Picture
    1,559 Super User 2025 Season 2 on at

    Hi @NPatel12498 

     

    In Power Apps, differences in preview mode and production mode can be puzzling.

     

    Do have a look into these fixes: 

     

    -Verify that the environment settings (such as connectors, gateways, and data policies) match between preview and production. 

     

    -Check if there are any differences in control properties or formulas between the preview and production versions of your app. Sometimes, certain properties or formulas might behave differently in these modes. 

     

    -Verify that the data sources (such as SharePoint lists, databases, or APIs) used by your app are accessible in both modes. 

     

    -Confirm that the user account running the app in production has the necessary permissions to retrieve data from these sources. 

     

    If this post helps, then Click on the Thumbs Up below and Accept it as the solution to help others find it. 

     

    Happy Power Apping.... 

     

    Thanks,   

       

    Robu1. 

  • NP-18101421-0 Profile Picture
    237 on at

    HI,

     

    So it looks like when I Monitor the app, the per diem rate control which shows blank on the screen, is giving a message:

    NPatel12498_0-1708355317963.png

     

    The per diem rate is a control that pulls the per diem rate from an excel file based off of the zip code and meal selected. I think the formula is what is causing the values to disappear, because within my Table, the data is showing fine. But in the editable grid, the per diem rate disappears.

     

    NPatel12498_1-1708356126304.png

     

    NPatel12498_2-1708356242482.png

     

     

    Per Diem Rate Default Property:

    Text(If(
     //ThisItem.'Event Lookup:Location of Event'.Value= Blank() && 
     varRecord.'Event Campus'.Value = "Other", ThisItem.'Per Diem Rate',
     With(
     {
     // Perform the lookup once to get the relevant row in collection
     Meals: LookUp(
     colPerDiemRate,
     ThisItem.'Event Lookup:Event Zip Code'.Value = 'Zip Code'
     )
     },
     // Use Switch to determine which value to retrieve
     Switch(
     dpdRequiredMeals.Selected.Value,
     "Breakfast",
     Meals.'Breakfast ',
     "Light Refreshments",
     Meals.'Light Refreshments',
     "Lunch",
     Meals.Lunch,
     "Dinner",
     Meals.Dinner
     )
     )
     //(Text(ThisItem.'Per Diem Rate',"[$-en-US]$ ###,##0.00"))
    ),"[$-en-US]$ ###,##0.00")

     

    Per Diem Rate OnChange Property:

    Select(btnUpdate)

     

    btnUpdate OnSelect Property:

     

    Patch('Checklist Details',ThisItem,{
     Title: txtTitle.Text,
     'Event Date': EventDate.SelectedDate,
     'Event Zip': txtEventZip.Text,
     'Required Meals': dpdRequiredMeals.Selected,
     'Event Duration (HH:MM)': Value(txtDuration.Text)//,
     //'Per Diem Rate': Value(txtPerDiemRate.Text)
     //'Per Diem Total': txtPerDiemTotal.Text
     //'Total Attendees': txtTotalAttendees.Value
     });
    If(
     IsBlank(
     LookUp(
     colAddMealsUpdates,
     ID = ThisItem.ID
     )
     ),
     Collect(
     colAddMealsUpdates,
     ThisItem
     )
    );
    UpdateIf(
     colAddMealsUpdates,
     ID = ThisItem.ID,
     {
     Title: txtTitle.Text,
     'Event Date': EventDate.SelectedDate,
     'Event Zip': txtEventZip.Text,
     'Required Meals': dpdRequiredMeals.Selected,
     'Event Duration (HH:MM)': txtDuration.Text,
     'Per Diem Rate':Value(txtPerDiemRate.Text),
     'Per Diem Total': Value(txtPerDiemTotal.Text),
     'Total Attendees': txtTotalAttendees.Value
     }
    );
    ClearCollect(
     colPerDiemRate,
     Table1
    );
    
    /*With(
     {
     // Perform the lookup once to get the relevant row in collection
     Meals: LookUp(
     colPerDiemRate,
     ThisItem.'Event Lookup:Event Zip Code'.Value = 'Zip Code'
     )
     },
     // Use Switch to determine which value to retrieve
     Switch(
     dpdRequiredMeals.Selected.Value,
     "Breakfast",
     Meals.'Breakfast ',
     "Light Refreshments",
     Meals.'Light Refreshments',
     "Lunch",
     Meals.Lunch,
     "Dinner",
     Meals.Dinner
     )
    )*/
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at

    hey @NPatel12498 

     

    did the values make it to the datasource?

    Can you check the default values of the fields? did you also check if the users have the right permissions to the datasource?

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • NP-18101421-0 Profile Picture
    237 on at

    Yes, the values are in the datasource:

    NPatel12498_0-1708356997700.png

     

    The permissions are all correct as well. So now I notice that if I change one of the values, then the per diem rates shows up again.  My company doesn't allow screen recording, but let me show you in screenshots.

    I opened the app and when to the editable gallery for a specific request, before I do anything this is how the screen looks:

     

    NPatel12498_1-1708357998396.png

     

    If I hit the refresh button, it still looks the same:

    NPatel12498_2-1708358022205.png

     

    Once I click into the duration or required meal and change it, the per diem rates end up populating... I changed the duration from 8 to 3000 and the per diem rates populated to values that were patched to the data source.

     

    NPatel12498_3-1708359343027.png

     

     

     

     

     

  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at

    hey @NPatel12498 

     

    powerapps never stops surprising me hahaha

    the per diem rate is a text field? what do you have as a default value there?

  • NP-18101421-0 Profile Picture
    237 on at

    Not sure, but it is definitely weird, because this wasn't happening before.

     

    The per diem rate is a text input control that pulls the per diem rate from an excel file based off of the zip code and meal selected. 

     

    Per Diem Rate Default Property:

    Text(If(
     //ThisItem.'Event Lookup:Location of Event'.Value= Blank() && 
     varRecord.'Event Campus'.Value = "Other", ThisItem.'Per Diem Rate',
     With(
     {
     // Perform the lookup once to get the relevant row in collection
     Meals: LookUp(
     colPerDiemRate,
     ThisItem.'Event Lookup:Event Zip Code'.Value = 'Zip Code'
     )
     },
     // Use Switch to determine which value to retrieve
     Switch(
     dpdRequiredMeals.Selected.Value,
     "Breakfast",
     Meals.'Breakfast ',
     "Light Refreshments",
     Meals.'Light Refreshments',
     "Lunch",
     Meals.Lunch,
     "Dinner",
     Meals.Dinner
     )
     )
     //(Text(ThisItem.'Per Diem Rate',"[$-en-US]$ ###,##0.00"))
    ),"[$-en-US]$ ###,##0.00")

     

    Per Diem Rate OnChange Property:

    Select(btnUpdate)

     

    btnUpdate OnSelect Property:

     

    Patch('Checklist Details',ThisItem,{
     Title: txtTitle.Text,
     'Event Date': EventDate.SelectedDate,
     'Event Zip': txtEventZip.Text,
     'Required Meals': dpdRequiredMeals.Selected,
     'Event Duration (HH:MM)': Value(txtDuration.Text)//,
     //'Per Diem Rate': Value(txtPerDiemRate.Text)
     //'Per Diem Total': txtPerDiemTotal.Text
     //'Total Attendees': txtTotalAttendees.Value
     });
    If(
     IsBlank(
     LookUp(
     colAddMealsUpdates,
     ID = ThisItem.ID
     )
     ),
     Collect(
     colAddMealsUpdates,
     ThisItem
     )
    );
    UpdateIf(
     colAddMealsUpdates,
     ID = ThisItem.ID,
     {
     Title: txtTitle.Text,
     'Event Date': EventDate.SelectedDate,
     'Event Zip': txtEventZip.Text,
     'Required Meals': dpdRequiredMeals.Selected,
     'Event Duration (HH:MM)': txtDuration.Text,
     'Per Diem Rate':Value(txtPerDiemRate.Text),
     'Per Diem Total': Value(txtPerDiemTotal.Text),
     'Total Attendees': txtTotalAttendees.Value
     }
    );
    ClearCollect(
     colPerDiemRate,
     Table1
    );
    
    /*With(
     {
     // Perform the lookup once to get the relevant row in collection
     Meals: LookUp(
     colPerDiemRate,
     ThisItem.'Event Lookup:Event Zip Code'.Value = 'Zip Code'
     )
     },
     // Use Switch to determine which value to retrieve
     Switch(
     dpdRequiredMeals.Selected.Value,
     "Breakfast",
     Meals.'Breakfast ',
     "Light Refreshments",
     Meals.'Light Refreshments',
     "Lunch",
     Meals.Lunch,
     "Dinner",
     Meals.Dinner
     )
    )*/

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 393

#2
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 271 Super User 2025 Season 2

Last 30 days Overall leaderboard