cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Sharepoint List Item boolean not working in Azure Automation

Hello together,

 

i have some problems while Running an Azure Automation Runbook.

If have a powerapp which fills out a Sharepoint List with some Data. 

And with flow i check if there is a new List item created then the approval starts and after that the Azure runbook is starting and get all needed Paramters from Sharepoint List.

 

it looks like this:AzureAuto.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This is working perfectly and the script in Azure Runbook receive all parameter.

 

But for the 2 booleans (in sharepoint list yes/no items) the script says cannot convert system type string to boolean. 

Why is the yes/no item from Sharepoint list a string not a boolean? 

 

Can anyone help me here?

 

Thank you in advance.

 

Best regards

 

Michael

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Sharepoint List Item boolean not working in Azure Automation

Hi @FlyingM,

 

Could you please share a full screenshot of the configuration of  Azure Automation action in your flow?

Could you please share a screenshot of the run history when the flow run failed?

 

Does the 2 booleans column that you mentioned in sharepoint list are the "Yes/No" type? Could you please share more details about the 2 booleans column?

 

Best regards,

Alice

Highlighted
Regular Visitor

Re: Sharepoint List Item boolean not working in Azure Automation

Could you please share a full screenshot of the configuration of  Azure Automation action in your flow? ->

 

AzureAutoFlow.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Could you please share a screenshot of the run history when the flow run failed? ->

 

The Flow run is running successfully but, the script failes because the yes/no column from sharepoint is transmitted as string not as boolean. So i receive the following error message in my azure automation runbook:

 

 

AzureRunbookFailed.png

 

 

 

 

 

Sharepoint list is yes/no type - looks like the following:

 

image.png

In my Runbook i run some commands only if the yes/no type is true.

 

Swyx User means a new user for our telephone system

Preprod means if its true the user will be created in the OU Pre production for testing.

 

Here is the runbook parameter set:

param (
 [Parameter(Mandatory=$true, HelpMessage = "1Enter the givenname of the user you want to create.")]
 [string] $givenName,
  
 [Parameter(Mandatory=$true)]
 [string] $surname,
  
 [Parameter(Mandatory=$true)]
 [string] $department,
  
 [Parameter(Mandatory=$true)]
 [string] $title,
  
 [Parameter(Mandatory=$true)]
 [string] $description,
  
 [Parameter(Mandatory=$true)]
 [string] $Password,
  
 [Parameter(Mandatory=$true)]
 [int] $internaltelephonenumber,
  
 [Parameter(Mandatory=$true)]
 [ValidateSet("Lyss", "Jona", "Obertshausen", "Ohrdruf")]
 [string] $Location,
  
 [Parameter(Mandatory=$true)]
 [bool] $Swyx,
  
 [Parameter(Mandatory=$true)]
 [bool] $PREPROD
  
  
 )

 

And in the Script

if ( $PREPROD )
 {
 $Path = "OU=Users,OU=Accounts,OU=" + $Location + ",OU=" + $c + ",OU=PreProd,DC=domain,DC=local"
 Write-Output "Preprod true"
 }
 else
 {
 $Path = "OU=Users,OU=Accounts,OU=" + $Location + ",OU=" + $c + ",OU=PreProd,DC=domain,DC=local"
 Write-Output "Preprod false"
 }
Regular Visitor

Re: Sharepoint List Item boolean not working in Azure Automation

Hello @v-yuazh-msft,

 

Could you please share a full screenshot of the configuration of  Azure Automation action in your flow?

AzureAutoFlow.png

Could you please share a screenshot of the run history when the flow run failed?

The Flow run is running successfully but, the script failes because the yes/no column from sharepoint is transmitted as string not as boolean. So i receive the following error message in my azure automation runbook:

AzureRunbookFailed.png

Does the 2 booleans column that you mentioned in sharepoint list are the "Yes/No" type? Could you please share more details about the 2 booleans column? 

 

Yes they are yes/no type.

In my runbook i run some commands if one of them is true.

SwyxUser will create a new user in our telephone system if its true

PreProd will create a AD user in a Pre production OU in AD for testing

 

Sharepoint list looks like this:

image.png

 

Highlighted
Regular Visitor

Re: Sharepoint List Item boolean not working in Azure Automation

Hi @v-yuazh-msft,

 

do you have any idea what i can do? I posted all the informations.

 

Thank you in advance!

 

Best regards

 

Michael

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,699)