Best way in Xano to concatenate a full address from parts that needs to be stored in table

I need to concatenate a full address from it's individual geocoded parts where some of the parts of the address may be null. The result needs to be stored in the table.

I know what I need to do, just not sure of the best way in Xano. This is part of an API call.

Parts include:

  1. StreetNumber
  2. StreetDirPrefix
  3. StreetName
  4. StreetDirSuffix
  5. City
  6. State
  7. Zip

I was trying to build a variable using Sprintf, however, I am having trouble eliminating the unneeded spaces when using something like Sprintf when one of the values is null.

2 replies