Solution: Using the Calculate Value Tool with a Python statement.Expression:field()
Code Block:def field():
ColName = []
CName = arcpy.ListFields("<pathtofolder>/%name%_id.shp", "FID_"+ "%name%"+ "_f*")
ColName.insert(0, CName[0].name)
return fieldName
Data Type:FieldThen use the calculated Output Value as input for the next tool (e.g. Join Field)When using a where clause for the Select tool e.g.:Expression: field()
Code Block:
def field():
ColName = []
CName = arcpy.ListFields("<pathtofolder>/%name%_id.shp", "FID_"+ "%name%"+ "_s*")
ColName.insert(0, CName[0].name)
where_clause = ColName[0] +' > -1'
return where_clause
Data Type:StringThe output value can then be used as input for the Expression of the Select Tool.