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

Community site session details

Session Id : g5UQelLu95Vo2RaCbI5C+f
Power Apps - Building Power Apps
Answered

Submit datepicker as metadata to document library

Like (0) ShareShare
ReportReport
Posted on 4 Aug 2022 12:50:04 by 10

I currently have trouble with something VERY similar if not entirely like this post:

https://powerusers.microsoft.com/t5/Building-Power-Apps/SUBMIT-DATE-PICKER-DATE-TO-SHAREPOINT-FORMULA/td-p/740142

 

However, if you read one of my recent comments ( I don't think this user is active anymore ), you'll note that I either don't know how to implement this correctly, or I'm fudging the flow/powerapps formula.

 

I googled and copied:

formatdatetime(triggerBody()['Updatefileproperties_EndDate'],'mm/dd/yyyy')
 
When it comes to my formula for PowerApps, I have managed to get it to work with almost all other data types to include a people picker, but I can't get it to work with the date picker. The formula I'm using is:
 

Set(varDemoFromAttachmentControl, JSON(Image1.Image, JSONFormat.IncludeBinaryData));
Set(varBase64Only, Mid(varDemoFromAttachmentControl, Find(",", varDemoFromAttachmentControl)+1, Len(varDemoFromAttachmentControl) - Find(",", varDemoFromAttachmentControl)-1 ));

Set(varFileLink, 'EasyUpload'.Run(Last(AttachmentControl.Attachments).Name, varBase64Only, DataCardValue7.SelectedDate).sharepointfilelink);

 

This entire formula was taken by Shane Young on his video: https://www.youtube.com/watch?v=3QaiM8SeWfM&t=0s

 

Can someone point me in the right direction?

 

Thank you

  • WarrenBelz Profile Picture
    148,894 Most Valuable Professional on 05 Aug 2022 at 21:35:38
    Re: Submit datepicker as metadata to document library

    Hi @patgat96 ,

    You need Create file for a Library (not Create item) - just add the date into the field in there.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • patgat96 Profile Picture
    10 on 05 Aug 2022 at 14:23:57
    Re: Submit datepicker as metadata to document library

    I'm running into a problem in the flow. Whenever I try to make the "create item" option, I cannot choose the document library. I'm not sure if this is because I've already called it once for the "create file" section or if it's because it's a document library and not a list.

  • Verified answer
    WarrenBelz Profile Picture
    148,894 Most Valuable Professional on 04 Aug 2022 at 20:57:51
    Re: Submit datepicker as metadata to document library

    Hi @patgat96 ,

    To things here - firstly the parameter for your date needs to be

    Text(DataCardValue7.SelectedDate,"mm/dd/yyyy")

    and then in your Flow, you need to put it back to a Date - example below I just tested and it worked fine.

    WarrenBelz_0-1659646319563.png

    Also a bit of optimising of your code to avoid leaving Variables "hanging around"

    With(
     {
     wJSON: 
     With(
     {
     wJSONI: 
     JSON(
     Image1.Image,
     JSONFormat.IncludeBinaryData
     )
     },
     Mid(
     wJSONI,
     Find(
     ",",
     wJSONI
     ) + 1,
     Len(wJSONI) - 
     Find(
     ",",
     wJSONI
     ) - 1
     )
     )
     },
     Set(
     varFileLink, 
    	 'EasyUpload'.Run(
     Last(AttachmentControl.Attachments).Name, 
     wJSON, 
     Text(DataCardValue7.SelectedDate,"mm/dd/yyyy")
     ).sharepointfilelink
     )
    );

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete