Set condition for those with 7characters only
- 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
Requesting your urgent help to provide the right formula or condition to identify each item. My condition is here:
If ID is equal to 7characters then that the Tagging is "Staff" but if its starts with 3 zeroes (or more than 7 characters) then its a "vendor".
Input and Output sample:
ID - Tagging
1655222 - Staff
000632563 - vendor
000235103658 - vendor
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
if Length([ID]) = 7 then "Staff"
elseIf Left([ID],3) = "000" and Length([ID]) > 7 then "Vendor"
else "Unknown"
EndIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
A conditional IF statement in a Formula tool will do the trick! There are functions like Length and StartsWith that will help :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
IF Length([ID]) = 7 THEN "Staff"
ELSEIF StartsWith([ID], "000") OR Length([ID]) > 7 THEN "Vendor"
ELSE "Unknown"
ENDIF
@PassION_es make sure your ID field is string data type , if it is integer then you need to use either toString() function or add a select tool then change the data type to string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you all. Yes @binuacs , it is string data type.
