substitute-null

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Functions > Function Library Reference > db >

substitute-null

Used to map the current field content if it exists, otherwise use the item mapped to the replace-with parameter.

fn-subsnull

The image below shows an example of the substitute-null function in use, and is available as "DB-ApplicationList" in the ...\MapForceExamples folder.

db-nul-substitue

The first function checks if a Category entry exists in the Applications table. As one does not exist for the Notepad application, "Misc" is mapped to the Category item of the Text file.

 

The second function checks if a Description entry exist, and maps the string "No description" if one does not exist, which is also the case with the Notepad application.


© 2019 Altova GmbH