cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FlyingM
Level: Powered On

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 Team
Community Support Team

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

FlyingM
Level: Powered On

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"
 }
FlyingM
Level: Powered On

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

 

FlyingM
Level: Powered On

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 Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 132 members 4,404 guests
Please welcome our newest community members: