Select to view content in your preferred language

Update Field status condition error

346
1
08-31-2023 11:02 AM
Labels (2)
rajujee
New Contributor III

Hi,

I received intent error on simple code below. your attention is appreciated.

def update_status(h_id, a, o):
  if h_id is None:
     return a
 else:
    return o


update_status(!H_No!, "Available", "Occupied")

intentation error using simple code below

0 Kudos
1 Reply
RhettZufelt
MVP Notable Contributor

Indent error.  you need to put one more space in front of else so that it is at the same indentation level of the if.

R_

0 Kudos