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 : DGuDhS/Gp5f0Luz5B7qaZl
Power Automate - Building Flows
Answered

Change/update sharepoint calculated column formula

Like (0) ShareShare
ReportReport
Posted on 22 Oct 2022 05:19:43 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.

 

  • josefm2 Profile Picture
    24 on 22 Oct 2022 at 14:35:56
    Re: Change/update sharepoint calculated column formula

    @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.

  • Verified answer
    grantjenkins Profile Picture
    11,059 Moderator on 22 Oct 2022 at 10:18:43
    Re: Change/update sharepoint calculated column formula

    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 22 Oct 2022 at 09:10:24
    Re: Change/update sharepoint calculated column formula

    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()'}"
        }
    }
  • grantjenkins Profile Picture
    11,059 Moderator on 22 Oct 2022 at 06:01:07
    Re: Change/update sharepoint calculated column formula

    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.

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2