create a new column if not exists in the input file
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi everyone,
I want to check a field, let's say "Age," to see if it already exists in the input file/select tool, and if not, I want to create a new field/column with the same name and add "0" or "Null" to it.
Can someone please help on this. Thank you!
Note:
Sometimes the required column is missing from the input data, so I want to create it only when it's not present, and then add either "0" or "Null" as the default value.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
HI @PhilipMannering thank you for the very quick response.
just wanted to add/ask one thing, that sometimes the required column is missing from the input data, so I want to create it only when it's not present, and then add either "0" or "Null" as the default value.
So in this conditions also your solution will work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It should, yes. Try adding Age to the Text Input and testing it yourself!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@PhilipMannering Love this!! Such a simple solution - thank you for sharing it, it gave me a quick win this morning :-)
