Can I make BlockUserInput Activity property (Mouse or Keyboard) like a Flag option (Enable or Disable mode)

Hi Team,

Can we use BlockuserInput -Mouse or Keyboard option to work like a flag from config like Enabled or disabled mode. If enabled mouse restriction can be applied or it should not be applied to the activities in the Blockuserinput container.

Thanks,
Boopathi

Hi @Boopathi.M

Yes you can use like that

Pass a Boolean value in the config file

If → Config value is True
True → Give the activities inside the Block User Input activity
False-> Give only the activities without the block user input

I think you cant pass directly in the blockuserinput activity

Regards
Sudharsan

Thank you @Sudharsan_Ka

Yes, I am checking whether we can pass the config condition in the Block property as I need to copy paste the same code in the else part if config is set outside like a condition.

Thanks

You can do as i said above @Boopathi.M

@Boopathi.M

You can add condition in that field directly like this

If(in_Config("Block").ToString.Equals("True"),BlockMethod.All,BlockMethod.None)

You need not have a separate if condition…open advanced editor by clicking on 3 dots beside the property to open panel and provide input as above

Hope this helps

Cheers

1 Like

Hi @Anil_G

Thank you. Yes, first i tried this one but actually Blockmethod does not have none property and given that condition in Block property but UiPath clearly says none is not member of Blockmethod. Can you please check it out or suggest any other option to give the condition directly in the block property?

image

Thanks,
Boopathi

@Boopathi.M

If(in_Config("Block").ToString.Equals("True"),BlockMethod.Mouse,BlockMethod.Keyboard)

Regards
Sudharsan

1 Like

@Boopathi.M

Please try like this

image

If(True,Nothing,Blockmethod.All)

Hope this helps

cheers

Thank you @Anil_G for suggestion. This one also tried already but does not work. UiPath continue to restrict mouse (given BlockMethod.mouse) if i use either true or false in that condition.

Thanks

Thank you @Sudharsan_Ka but I am trying to free mouse restriction in the same property “Block”. If condition is true, then apply mouse restriction false means then not to apply mouse restriction like the condition anil posted

Thanks
Boopathi

@Boopathi.M

Okay I see when we give nothing it by default takes All. So The only way that you can go about is usinf if condition before hand and then decide to use …

cheers

1 Like

Okay, Thanks for your suggestions @Anil_G and @Sudharsan_Ka

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.