Set boolean via sync rule


I am trying to set a boolean value on a host object by importing a csv file.
The value in the csv column is set to “true” (without the quotation marks)
The director creates the host object like this, with the quotation marks:

`object Host “xxxxxx” {

import "xxxxxx" 	

display_name = "xxxx" 	

vars.boolean = "true"


So the boolean variable is interpreted as a string and therefore is not set in the GUI.
Can someone explain to me how I can set the boolean via the sync rule?
Do I have to use a different import source, like json?

Thanks and regards

You can define a modifier “convert to boolean value” at the import source.

1 Like

Thank you. This works great.

Thanks for feedback. You always can mark a post as solution, so that everyone can see that the problem is solved. Additional the solution will be posted directly under the question.

1 Like