Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

(0) ShareShare
ReportReport
Posted on by

I have a form that is supposed to capture UPN of logged in employee. The field has code

Office365Users.MyProfile().UserPrincipalName  as I want to capture the UPN of logged in user in form text field as defalut value that is not editable by user in form. 

 

This field is not editable and my intention is to show UPN that is not changeable/ editable by user, when i run the form, it shows me my name in form field and enters my name in list using flow. 

 

when some other user calls the flow it does not enter data in SharePoint list but i see their data values in flow.  the error i received in flow is: The response is not in a JSON format. "

 

 

Below are forms and flow i am using to update sharepoint List.

 

tempsnip.pngVar-Flow.PNG

Create item.PNG

Here is FLOW entry with user data 

 

tempsnip1.png

 

I just noticed that for every user the connection is my name 

 

 

tempsnip2.png

Could this be the reason of error?

 

If yes how to resolve it as to my understanding , this connection should be each users name? how to resolve this issue?

 

TIA

 

  • Pstork1 Profile Picture
    Pstork1 64,996 on at
    Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    Sorry, I don't know how you would go about doing that, especially if its not the same user account that is logged into Power Automate Desktop.

  • Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    @Pstork1 Hope you are doing well. I need some more help in getting informaiton of logged in user  in Power automate Desktop .

     

    I want to get the information of user's  name/info ( such as full name, UPN) from window that is connected to Azure AD. Cna you help?

     

     

  • Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    Thanks a lot. I really appreciate your cooperation.

     

     

  • Verified answer
    Pstork1 Profile Picture
    Pstork1 64,996 on at
    Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    As I mentioned previously.  If WorkDate is a label then you are trying to use the label control as input for the Text function.  That won't work.  It needs to be WorkDate.Text.

  • Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    @Pstork1  The date is label inface everything is label as it s only to view and  data is entered on button click. I used this but i recieve same error.

    TestFlow.Run(Name.Text,WorkTime.Text,Arrival.Text,Text(WorkDate,"[$-en-US]yyyy-MM-dd"),Email.Text)

    Sorry i am very new to PowerApps and this is my first app. I appreciate your cooperation. 

     

  • Pstork1 Profile Picture
    Pstork1 64,996 on at
    Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    If Date is a label then you need to access the Text property of the label, not just Date.

    TestFlow.Run(Name.Text,Email.Text,Arrival.Text,Text(Date.Text,"[$-en-US]yyyy-mm-dd"))

      I would also avoid using Date as a label name since its a reserved word. 

  • Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    @Pstork1 I thought to redo form.

     

    i have another scenerio, I need date and time for time sheet , i am trying to have only date and time in different Labels Say Date and time where

    Date --> Text( Now(), DateTimeFormat.LongDate ) and

    time is Text(Now(), "HH:mm AM/PM")

     

    Now when i run flow it gives error Error details: 'String 'Tuesday, July 6,2021' does not validate against format 'date'.'." and flow is TestFlow.Run(Name.Text,Email.Text,Arrival.Text,Text(Date,"[$-en-US]yyyy-mm-dd"))

     

    how to resolve this issue?

  • Pstork1 Profile Picture
    Pstork1 64,996 on at
    Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    How are you using User().FullName that it shows the Full name of the maker of the app?  It should pull the person running the app.  Are Workdate and Time variables?  That's probably the issue.  Because those values when passed are strings and the fields you've put them in are expecting Date Time values.  You'll probably need to cast them using FormatDateTime() in the flow.

  • Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    @Pstork1 Thanks for responding to the post. I tried user() it displayed user email of logged in  but user().FullName still shows the name of app creator.

    this is run line to invoke the flow. 

     

    TimeSheetManagementFlow.Run(Label7.Text,WorkDate,Time,Arrival.Text)

     

    where Label7 is User().Email

     

     

     

     

     

  • Pstork1 Profile Picture
    Pstork1 64,996 on at
    Re: SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

    If what you want is the UPN of the logged in user then I would use User().Email rather than Office365Users.myProfile().  There is no guarantee that everyone has a profile.  

    Other than that can you show us the .run line you are using on the buttons to invoke the flow?

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard