Here is my Configure script:
out1['Employee ID'] = fields['ps.EMPLID']
out1['Last Name'] = fields['ps.LAST_NAME']
out1['First Name'] = fields['ps.FIRST_NAME']
out1['Middle Initial'] = fields['ps.MIDDLE_NAME']
out1.Email = fields['ps.EMAIL_ADDR']
out1['Supervisor ID'] = fields['ps.SUPERVISOR_ID']
out1['Dept Name'] = fields['ps.DEPTNAME']
out1.Description = fields['ps.LOCATION_NAME']
out1['Cost Center'] = fields['ps.DEPTID']
out1['Business Phone'] = fields['ps.XBUSNPHONE']
out1['Business Mobile'] = fields['ps.XBUSCPHONE']
Here is my ProcessRecord script:
out1 += in1
if in1['Business Phone'] is Null:
pass
else:
out1['Business Phone'] = in1['Business Phone'].replace("/", "-")
I'm now getting the following error:
ERROR: Business Phone does not exist on input (0)"in1". error in ProcessRecords at line 3 (which is where if statement starts.
------------------------------
Shawn Pelletier
Knowledge Community Shared Account
------------------------------
Original Message:
Sent: 08-24-2022 11:20
From: Adrian Williams
Subject: Replace "/" with " " if string contains "/"
Given the sample data:

You can use the following approach:

Which results in:

With the Python language you have to explicitly handle Null values before attempting to use string operators.
You may find useful the information in the 'Migrating from LAE' section of your system's Help documentation, specifically the topic on 'BRAINScript to Python'. The information is also available online here:
https://d3sa-preview.infogixsaas.com/docs/dist/help/Default.htm#l-migration/script-to-python.htm
------------------------------
Adrian Williams
Precisely Software Inc.
Naperville IL
Original Message:
Sent: 08-23-2022 09:53
From: Shawn Pelletier
Subject: Replace "/" with " " if string contains "/"
I'm trying to replace "/" with " " if the string contains a "/", otherwise I want to use the default string value from the input node. I've tried various replace configurations with no luck. I'm new to Data360 but a longtime user of LAE.
------------------------------
Shawn Pelletier
Knowledge Community Shared Account
------------------------------