Skip to main content

Hi I am using FME Form 2021

I am passing a ArcGIS portal login (including domain) as a user parameter

e.g. username@sss.co.uk

 

When I try to get the value in pythonCaller

portalAdmin = str(FME_MacroValuese'ArcGIS_Portal_UserName']).strip() 

It is coming as

username<at>sss.co.uk

I am unable to use this to login to my portal in pythonCaller.

 

Any idea how to escape the @ sign ?

What type of user parameter, and how is it configured? I was able to recreate your issue using a Text parameter with the HTML editor syntax. However, with a Plain Text (Uniline) syntax the @ symbol comes through as expected.

 


Try this:

import fmeobjects

username = str(FME_MacroValues['ArcGIS_Portal_UserName'])
username_parsed = fmeobjects.FMESession().decodeFromFMEParsableText(username)
portalAdmin = username_parsed.strip()

Documentation: https://docs.safe.com/fme/html/fmepython/api/fmeobjects/_utilities/fmeobjects.FMESession.decodeFromFMEParsableText.html#fmeobjects.FMESession.decodeFromFMEParsableText


Reply