Skip to main content

Hi,

I am trying to concatenate a string. The attribute I am using in the concatenation has been extracted from JSON into a list then exploded into an attribute. However, the string concatenator is not ignoring the attribute, the result just has the other string values concatenated together without the attribute value.

Any pointers would be much appreciated. Example workbench is here;

Thanks

Insert a breakpoint on the input connection to the StringConcatenator, execute the workspace with breakpoints enabled and inspect the attribute values.

More info on breakpoints: https://desktopmanualbasic.safe.com/DesktopBasic3BestPractice/3.17.FeatureDebugging.html


Insert a breakpoint on the input connection to the StringConcatenator, execute the workspace with breakpoints enabled and inspect the attribute values.

More info on breakpoints: https://desktopmanualbasic.safe.com/DesktopBasic3BestPractice/3.17.FeatureDebugging.html

Thanks David. I have been inspecting the data along the way. I have also since added an attribute validator before the string concatenation and found that the attribute value is not a string but an alphanumeric. How do I change the format to string?

 

 


I had a look at the workspace you posted (thanks for making it runnable without any external dependencies!).

The issue is that the StringConcatenator references an attribute "folders" that doesn't exist at run-time:

The right hand side is showing the feature attributes that's entering the StringConcatenator. As you can see in the square, there are no attributes called "folders". Maybe you want the value from "_folderlist"? If so, you need to fix the JSONFlattener setting before modifying the StringConcatentor accordingly:


The values you want are already present in an array at the attributefilter. If you use an attributeexposer to expose array{} you can then use the list exploder on this and then the value you need for your string concatenator is stored in an attribute called array


Thanks @egomm and @david_r both of your suggestions did the trick.

 


Reply