question

BasilPJoy-6982 avatar image
0 Votes"
BasilPJoy-6982 asked BasilPJoy-6982 commented

When an item or a file is modified is not triggering

I tried to create an approval flow while updating a column, but the first step itself is not triggering at all and showing errors in the flow checker like this. "ResponseSwaggerSchemaValidationFailure. The API 'sharepointonline' returned an invalid response for workflow operation 'When_an_item_or_a_file_is_modified' of type 'OpenApiConnection'. Error details: 'The API operation 'GetOnChangedItems' is missing required property 'body/value/0/Title'.'". Anyone please help on this matter.

office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

YiLu-MSFT avatar image
0 Votes"
YiLu-MSFT answered BasilPJoy-6982 commented

Hi @BasilPJoy-6982
Do you create the flow from template? If yes, you could try to recreate it from blank.

Or you could check if the "Titile" field in the changed item is set blank. Review the items in the list and fill that title field that may have another label but originally the field was called title.

You could edit the column settings as the screenshot to enforce the field to be filled in by going to list settings> Title

144471-image.png


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (138.0 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @YiLu-MSFT

Yes I created it from blank and the title column same as like in the screenshot. But I didn't add the title field in the form it is hidden because don't need of tittle field in my requirement. I hope title field will be blank if we are not filling it. Is there any way to dynamically fill the same from back end ?

0 Votes 0 ·

Hi @BasilPJoy-6982
You could use the following code to fill in the exsiting item "Title"

 #Config Parameters
 $SiteURL="https://crescenttech.sharepoint.com"
 $ListName="list"
       
 #Setup Credentials to connect
 $Cred= Get-Credential
 $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
     
 #Setup the context
 $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
 $Ctx.Credentials = $Credentials
        
 #Get the List
 $List=$Ctx.Web.Lists.GetByTitle($ListName)
     
 #Get All List items
 $ListItems = $List.GetItems([Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery())
 $Ctx.Load($ListItems)
 $Ctx.ExecuteQuery()
    
 #sharepoint online powershell loop through list items
 Foreach ($Item in $ListItems)
 {
      $Item["Title"] = "Project Darwin" 
     $Item.Update()
     $Ctx.ExecuteQuery()
     write-host "Item Updated!"  -foregroundcolor Green
 }

Then the value in "Title" will be the same:

144870-image.png
What's more, you could set a default value for "Title" value:

144930-image.png


In this way, you will not need to fill in "Title" column manually. When you create a new item, the value in the field will be default value, instead of be blank.


0 Votes 0 ·
image.png (33.1 KiB)
image.png (20.8 KiB)

Hi @BasilPJoy-6982
Have you tried the two steps I provided for you? If you have some doubts about it, please feel free to reply.

0 Votes 0 ·

Hi YiLu-MSFT,

Thank you so much, the problem was because of the empty title field and I made the default value as something like you mentioned in the second step. Now my problem is solved and a big thanks for you.

0 Votes 0 ·