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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change to user().email...
Power Apps
Answered

Change to user().email now formulas not working

(0) ShareShare
ReportReport
Posted on by 57

 Hello,

 

I just realized I coulse use user().email instead of a drop down choice so I changed out that user input area and now nothing works. 

 

The following is my order of operations before the error. 

  1. change the choice input to a text input (single-line) and changing the default to user().email
  2. Error
  3. Change column in sharepoint from choice to single-line text
  4. (From here is saved in a collection for review before submitting)
  5. Submit button does not work. It is in the collection. I can see it there, but it is not uploading to sharepoint list.
  6. Change sharepoint column name so it is no longer the same as the text input. 
  7. Error
  8. Everywhere in my powerapp that uses this "SubmittedBy" has an error now. 

 

I was thinking it might be because user().email may not be considered a "single-line" text format? 

 

AddDetail = My Collection Name

'Test List' = my Sharepoint List

 

 

submit error.PNG

 

Categories:
I have the same question (0)
  • Isa_Watanabe Profile Picture
    38 on at

    Hi jbaggett,

     

    This is how I typically troubleshoot Patching issues when a field type changes:

    1. Refresh your data source (View > Data Sources)
    2. Identify which fields are mandatory in your SharePoint 'List Settings'
    3. Reduce your Patch function within the ForAll to include only the required fields. Test
      • If it fails, you have either missed a required field or the data type for 1 or more required fields is incorrect. In this instance use the Value() or Text() functions to make the corrections.
      • If it succeeds, then your issue is with a non-required field
    4. Add your non-required fields one-by-one until it fails again
    5. Let's assume your issue is with the Submitted field (which is now a single-line text field) and the user().email input.
    6. Check your collection to make sure that your collection is storing user().email to the SubmitedBy column in the collection correctly. A way to test this is to create a label and make the text property the SubmittedBy of a single row of your collection, add a period to make sure no other properties are being returned: i.e. AddDetail[@SubmittedBy].?????
    7. Assuming that there is nothing you can select after adding the period, you have a Text field.

    If this does not resolve your issues, consider removing the ForAll and patching a single line instead. If that still does not work, please send the error messages.

  • jbaggett Profile Picture
    57 on at

    Hello, 

     

    Thanks for the response! Unfortunately I'm still having issues. 

    1. I did refresh the data source
    2. The amandatory fields in my sharepoint are the submittedby and SO. 
    3. I did reduce the patch function to only the two fields and the issue still happened. (See picture below).
    4. I have not added in my non required fields yet
    5. the issue does seem to be the user().email
    6. My collection looks to be storing the email as a record. Am I able to upload a record into a sharepoint column formatted as a single line text? I tried to convert it within the formula useing Text() and it didn't not work. I did create a labled and it is respondig correctly with the email. 

    Collection showing recordCollection showing recordPatch with only required inputsPatch with only required inputs

  • Isa_Watanabe Profile Picture
    38 on at

    That is definitely your issue! You cannot write a record to a text field in SharePoint. I would recommend removing your original collection (and creating a new one) since the data type is set as a record for the SubmittedBy column.

    When creating your new collection wrap User().Email using Text().... i.e. Text(User().Email).

     

    After your collection is created, double-check to make sure that your SubmittedBy column is not a record.

  • Verified answer
    jbaggett Profile Picture
    57 on at

    I finally got it! At first it did not work BUT

    1. I found all code referencing my collection and \\made it a note.
    2. I deleted the input box for my "Submitted By"
    3. I deleted the coding calling out the "Submitted By"
    4. Then I deleted the column in sharepoint list 
    5. Saved and closed List and PowerApps
    6. Restarted List and PowerApps
    7. Remade the column as a text (orginally I tried just editing the column but it did not seem to take, even after a refresh)
    8. Refreshed Data Source in PowerApps
    9. Deleted \\from the code refernecing the collection
    10. Put input box for "Submitted By" with text wrap Text(User().email))
    11. Typed back in the all code calling out the "Submitted By"

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 380 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 340

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard