콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
5915 화면

Hello Community,

I stumbled over the following. I have an input named BNS (for bonus).

And I have a Phyton condition: result = inputs.BNS.amount > 0

and I tried the second version of it: result = inputs.BNS.amount is not None 

Based on whether it is true the calculation should activate. 

When there is an BNS input in a payroll slip, everything works. If there is no BNS input, i get the error in subject. Please, advise how to skip this rule execution when there is no BNS input

아바타
취소
베스트 답변

Hello,

You can use try and except

example

try:

     result = inputs.BNS.amount
except:

     result = 0

아바타
취소
베스트 답변

Hi

make the conditions based on = always true

computation:

Amount Type = python code

python code = result = inputs.BNS1.amount * 1


and in the inputs tap add

description= Bounce

Code= BNS1


Hope that help


아바타
취소
관련 게시물 답글 화면 활동
1
5월 25
1135
1
3월 25
1218
0
2월 25
1442
1
12월 24
1893
0
11월 24
108