Multifield Formula
- 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
How to use Multi field formula, I have used but confused when trying to use formula for Multi field tool, Any help would be appreciated.
Thanks
AJAY
Solved! Go to Solution.
- Labels:
- Preparation
- Text Mining
- Transformation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Your formula syntax is incorrect at the moment. It needs to be:
IF
*True or false condition*
THEN
*Value if condition is true*
ELSE
*Value if condition is false*
ENDIF
What are you trying to achieve with this formula? Let me know and I'll help you write it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ajanayak as the name suggests the multi-field formula is just applying a formula to many fields at once to save you time. It follows all the same rules as the normal formula tool. What are you trying to achieve in yours?
Your current error is because you have nothing after your THEN before the ELSE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have attached the file here where the input and output is given.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You just need to do a couple of things in your IF statement
1. When you write THEN .. you don't have anything after it?
So you can do the following:
1.1 THEN null()
1.2 THEN "" ... this is an empty string, notice that between the "quotes" nothing is inbetween them. So you are assigning 'nothing' to them.
2. For your ELSE statement, you want to say ELSE 'f' .. you need to put the f in quotes because this tells the computer it is string. Basically, assign it the letter 'f'
3. The last thing, your column data type is set to int64. This means the data allowed in this column has to be a whole number or the value null(). If you want to be able to assign values to the letter 'f' (using your ELSE logic). You will need to change this column's datatype to V_STRING or V_WSTRING. A numeric column can't contain string. See attached for where to make the adjustment. Change the INT64
- 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
