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 / AddProperty odata.etag
Power Automate
Answered

AddProperty odata.etag

(1) ShareShare
ReportReport
Posted on by 186

Hi All,

 

I am building up a JSON object and need to add the odata.etag property like so:

 

addProperty(variables('payload'), '@odata.etag', body('Get_Item')?['odata.etag'])

 

but I get the following error message:

Unable to process template language expressions in action 'Compose_4' inputs at line '1' and column '2957': 'The provided property name '@odata.etag' has these invalid characters '.'. The name cannot contain any of the following symbols: '[, ], .'.'.

 

I've tried stringifying it, puting it in a compose, setting the property rather than adding it, but it's all the same.

 

Anyone know of a workaround?

 

Thanks

 

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @LKS,

     

    Since the "." is an invalid character to be added as a property name, so it is impossible to approach that directly.

    As a workaround, you could add the "@odataetag" into it firstly, then use string() function convert the object to string, then use replace() function replace "@odataetag" to "@odata.etag", then use json() function convert it back to object:

    addProperty(variables('payload'), '@odataetag', body('Get_Item')?['odata.etag'])
    json(replace(string(outputs('Compose')),'@odataetag','@odata.etag'))

    Screenshot 2021-03-11 155409.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • Suggested answer
    WhiteHat Profile Picture
    25 on at
    Another method would be to create a stand-alone object with the etag property (including the period) using the Compose action.
     
    Then use the Union function to combine the stand-alone object with the target object (payload).
    The union will result in a new object with all properties from both objects.
     

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard