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 / App working but not pa...
Power Apps
Answered

App working but not passing data to Sharepoint list

(0) ShareShare
ReportReport
Posted on by 11

Hello everyone!

 

I made an app which purpose is to make vacation request which works fine.

 

app.png

It has two fields where  inside it has calendars and you can choose the start date (Fecha Inicio) and the end date (Fecha Fin) of your vacations request, also there is another field (Numero de Días) that displays the total numbers of days calculated from the calendar inputs (btw, this is the article i used to create the code https://powerapps.microsoft.com/hi-in/blog/excluding-weekends-and-holidays-in-date-differences-in-powerapps/).

 

appnum.png

 

After filling the fields the app sends the data to a Sharepoint List, the only problem is it doesn't display the input from the field "Número de Días", the one that shows the number of days based off the calculation from the calendar inputs.

 

columna vacia.png

 

 

This is the code that i'm using on the OnChange properties from the Date fields 

 

 

UpdateContext({actualiza:"No"});;
UpdateContext({numDias:RoundDown(DateDiff(DataCardValue13.SelectedDate; DataCardValue14.SelectedDate; Days)/ 7; 0)* 5 +
Mod(5 + Weekday(DataCardValue14.SelectedDate) - Weekday(DataCardValue13.SelectedDate); 5)});;

 

 

And this is the condition i'm using to validate the calculation on the Text property where the number of days appear

 

 

If(actualiza = "Si"; Parent.Default; If(actualiza = "No"; numDias))

 

 

valores.png

How can i make that value appear on the SP list?

 

Thanks!

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @AlexVargaz 

    Please review your Update property for your Numero de Dias_DataCard3.

    First, is the Field that is defined on it the 'Numero de Dias' field?

    Second, what is the Update property of it?

    You can skip all the variables and simply put the formula you have in the update property:

    RoundDown(
     DateDiff(
     DataCardValue13.SelectedDate; 
     DataCardValue14.SelectedDate; 
     Days
     )/ 7;
     0
    )* 5 + Mod(5 + Weekday(DataCardValue14.SelectedDate) - Weekday(DataCardValue13.SelectedDate); 5)
    

     

    Since this number is calculated based on other datacard values, dealing with a default is not necessary, unless you want it displayed.  If so, then just switch the above to the Default property of the datacard and then set the Update property to Value(DataCardValue17.Text)

     

    I hope this is helpful for you.

  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at

    I may need a little more info but here are a few things to look at:

    Is the Update of Numero de Dias DataCard3 set to the correct field in your SP list?

    Depending on the field in your SP list -does the formula return the correct data type - either Date or Text depending on the field?

    Have you tried putting the If formula in the DataCard default instead of the "Value17" input?

     

  • AlexVargaz Profile Picture
    11 on at

    Yes, the Field that is defined on it is the same as the 'Numero de Dias' field. Thanks for the reply i didn't think about the Update property but do i need to do some kind of configuration in order for 'Update' to appear on the screen? Because i can't find the Update property when selecting Numero de Dias_DataCard_3 in particular

     

    update.png

     

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

     

    @AlexVargaz 

    How did you add that DataCard?  If you didn't go to Edit fields and then add that field from the list, then your datacard will NOT have the Update property.  

    ALSO - if you have made that datacard View only, it will also not have an Update property.

     

     

  • AlexVargaz Profile Picture
    11 on at

    I did have view only configuration, after that it worked. Thanks!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard