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 Automate / Change/update sharepoi...
Power Automate
Unanswered

Change/update sharepoint calculated column formula

(0) ShareShare
ReportReport
Posted on by 24

Hi,

 

I'm having this error when i run my flow.

 

Error
Action 'Send_an_HTTP_request_to_SharePoint' failed

Error Details
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Hostname</h2>
<hr><p>HTTP Error 400. The request hostname is invalid.</p>
</BODY></HTML>

clientRequestId: c2e6c93c-ca2c-43d9-b323-xxxxxxxxxx

 

Tried following this:

Use Power Automate to automatically update calculated column on a SharePoint List (365hq.net)

 

My flow:

josefm2_1-1666415958420.png

 

Thanks.

 

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    It looks like you've just copied both the Uri and Body from the website you linked to, and they still contain incorrect single quotes. I'd suggest pasting them into Notepad and replacing them all.

  • josefm2 Profile Picture
    24 on at

    Hi @grantjenkins ,

     

    I made both changes with the same error.

     

    uri: /_api/web/lists/getbytitle('tbl_critical_alert_main')/fields/getbytitle('testToday')

    body: {'__metadata':{'type':'SP.FieldCalculated'},'Formula':'Today()'}

     

    Error:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
    <HTML><HEAD><TITLE>Bad Request</TITLE>
    <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
    <BODY><h2>Bad Request - Invalid Hostname</h2>
    <hr><p>HTTP Error 400. The request hostname is invalid.</p>
    </BODY></HTML>

    clientRequestId: ea34bc05-f619-4c08-87d9-

     

    Show Raw Inputs:

    {
        "host": {
            "connectionReferenceName""shared_sharepointonline",
            "operationId""HttpRequest"
        },
        "parameters": {
            "dataset""https://xxxx.sharepoint.com/sites/xxxx",
            "parameters/method""POST",
            "parameters/uri""/_api/web/lists/getbytitle('tbl_critical_alert_main')/fields/getbytitle('testToday')",
            "parameters/headers": {
                "content-type""application/json;odata=verbose",
                "X-HTTP-Method\t""MERGE",
                "Accept""application/json;odata=verbose\n"
            },
            "parameters/body""{'__metadata':{'type':'SP.FieldCalculated'},'Formula':'Today()'}"
        }
    }
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    A few things I can see:

    1. It looks like you've got a tab after your X-HTTP-Method. Might be worth re-typing that part out.
    2. It looks like you've got a new line after your application/json;odata=verbose for your Accept value. Might be worth re-typing that part out too.
    3. The formula should be '=TODAY()' - you don't have the = in yours.
    4. Make sure you are using the Title (not the internal Name) of your List and Field.
  • josefm2 Profile Picture
    24 on at

    @grantjenkins, very much appreciated. Followed items 1 to 3. As a result of the large number of records in our SPList, updating the current date in a list would take hours.(using another scheduled flow). This just takes a click of the test button. I made two flows with distinct schedules: today and today Plus 1.

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard