cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

App working but not passing data to Sharepoint list

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-po...).

 

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: App working but not passing data to Sharepoint list

 

@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.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: App working but not passing data to Sharepoint list

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Responsive Resident
Responsive Resident

Re: App working but not passing data to Sharepoint list

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?

 

Highlighted
Frequent Visitor

Re: App working but not passing data to Sharepoint list

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

 

 

Highlighted
Super User III
Super User III

Re: App working but not passing data to Sharepoint list

 

@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.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Highlighted
Frequent Visitor

Re: App working but not passing data to Sharepoint list

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,349)