SOLVED
IF Statement
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
student123456
5 - Atom
‎06-01-2020
03:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
When I use the formula:
IF Length([pcd7])=7 THEN Left([pcd7], 5) ELSEIF ([pcd7])=6 THEN Left([pcd7], 4) ELSEIF ([pcd7])=5 THEN Left([pcd7], 3) ELSE [pcd7] ENDIF
I receive the error message "Parse Error at char (0): Invalid type in operator =="
My data type match up, as they're both string. It works fine as a single if statement.
Can someone please advise where I am going wrong?
Thank you!
Solved! Go to Solution.
Labels:
- Labels:
- Error Message
2 REPLIES 2
12 - Quasar
‎06-01-2020
03:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @student123456 ,
Try updating your formula to this:
IF Length([pcd7])=7 THEN Left([pcd7], 5) ELSEIF Length([pcd7])=6 THEN Left([pcd7], 4) ELSEIF Length([pcd7])=5 THEN Left([pcd7], 3) ELSE [pcd7] ENDIF
‎06-01-2020
03:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Perfect! Thank you.
![](/skins/images/A29875142F332EEF75F19ED75711F41B/responsive_peak/images/icon_anonymous_message.png)