Hi @mikesando, in your current setting for the second AttributeValueMapper (MATERIAL_4), the original attribute value (e.g. "Polyvinyl Chloride (PVC)") will be assigned to a new attribute called "_fme_validation_message_List{}". It's just a regular attribute which contains "{}" within its name. What do you want to achieve using the second AttributeValueMapper?
Hi @mikesando, The validation in the rwMain_Attribute_Validator transfomer will result in a list (fme_validation_message{}) so its unclear to me, as @takashi mentions, why you are mapping the values in the MATERIAL_4 transformer into an attribute with the same name.
Hi @mikesando, in your current setting for the second AttributeValueMapper (MATERIAL_4), the original attribute value (e.g. "Polyvinyl Chloride (PVC)") will be assigned to a new attribute called "_fme_validation_message_List{}". It's just a regular attribute which contains "{}" within its name. What do you want to achieve using the second AttributeValueMapper?
The first Attribute value mapper (MATERIAL_11) is to validate exactly what is in our database, but the second Attribute value mapper (MATERIAL_4) is where I would like it to switch back to the original attribute with the error (list) and send to the writer (CSV file). The reason for this is with our as-built standards the surveyor/contractor never sees the "PVC" and only sees "Polyvinyl Chloride (PVC)" so when I export the error report and send to them they will be familiar with what the material is.
validationreport.csvI am trying to get the fme_validation_message{} to switch back to
Polyvinyl Chloride (PVC) instead of the abbreviations i.e. PVC in the CSV file attached.
validationreport.csvI am trying to get the fme_validation_message{} to switch back to
Polyvinyl Chloride (PVC) instead of the abbreviations i.e. PVC in the CSV file attached.
@mikesando, why not validate the MATERIAL value by non-abbreviations (e.g. 'Polyvinyl Chloride (PVC)' etc.) with the AttributeValidator, before the first AttributeValueMapper?
@mikesando, why not validate the MATERIAL value by non-abbreviations (e.g. 'Polyvinyl Chloride (PVC)' etc.) with the AttributeValidator, before the first AttributeValueMapper?
attributes.jpgThank you @takashi for you time. The other reason I have to map the attributes to the abbreviations when trying to do it the way you suggested and if it had any &, ', / characters it would not output the attribute?
validationreport.csvI am trying to get the fme_validation_message{} to switch back to
Polyvinyl Chloride (PVC) instead of the abbreviations i.e. PVC in the CSV file attached.
@mikesando, I don't think those characters (& /) cause any problem even if you validate MATERIAL values with non-abbreviations. See the attachment (FME 2016.0+):
attributevalidator-example.fmw
@mikesando, I don't think those characters (& /) cause any problem even if you validate MATERIAL values with non-abbreviations. See the attachment (FME 2016.0+):
attributevalidator-example.fmw size-test.fmwThanks again
@takashi. Due to your example I was able to get it to work, but it still rejects the inch symbol (") in the SIZE of main. Please see example and is there a work around for this?
validationreport.csvI am trying to get the fme_validation_message{} to switch back to
Polyvinyl Chloride (PVC) instead of the abbreviations i.e. PVC in the CSV file attached.
Hi @mikesando, the double quotation mark and comma are special characters in FME string functions. If a parameter string contains a quotation mark or a comma, the string should be surrounded by double quotations and a double quotation mark within the string should be escaped by another double quotation. e.g. this rule configuration for the In operator will check if the SIZE matches 10" or 8".
"10""","8"""
It works for the validation itself, but in my test, the rule configuration was written into the validation message string literally, like this.
Attribute 'SIZE' with value '20"' fails check for in '"10""","8"""'
If it's not allowable, a possible workaround I can think of is:
- Replace every double quotation mark in the SIZE values with a special string. e.g. '<quote>'
- Validate the SIZE values with | SIZE | In | 10<quote>,8<quote> |
- Replace every '<quote>' within the validation message string with double quotation mark.
Okay let me try that and see what I can come up with. Thank you SO much for your time and help!
That worked!!!! Thank you!