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 / Submit datepicker as m...
Power Apps
Answered

Submit datepicker as metadata to document library

(0) ShareShare
ReportReport
Posted on 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

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,547 Most Valuable Professional on at

    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

     

     

     

  • patgat96 Profile Picture
    10 on at

    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.

  • WarrenBelz Profile Picture
    154,547 Most Valuable Professional on at

    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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 509 Most Valuable Professional

#2
Haque Profile Picture

Haque 302

#3
11manish Profile Picture

11manish 265

Last 30 days Overall leaderboard