Multiple If Statement with A Blank Field and A Numeric Value
- 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, I am trying to perform a multiple condition if statement. In each expression is revolves around two fields 'HCI' and 'Sty.' which are both vstring data types. In some cases the field the HCI field is empty so I captured and isempty field. Essentially this formula is trying to calculate an hourly rate based on the two field conditions. However, the formula gives me a "parse error (361) malformed if expression #1).
Does anyone know why I am getting this error and if it has something do with the data types? I am trying to get a double output as I am trying to get an hourly rate.
 
- Labels:
- Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I think you need to make all your ELSE IF parts into one word - ELSEIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@alexnajm is right, you need to remove the space between ELSE and IF.
However, best practice could be to break your formula apart into logical pieces. It will save you a lot of headaches when having to troubleshoot issues or modify values. For example, I noticed all of your CA16 are 1.25 and all of the CA14 are 1.0; instead of repeating this, value, you could set it once (I called it "Base"). All of the CHI =1 or 3 are *2 and HCI = 2 are 2*0.5. Instead of repeating that, you can set it once (I called it the Multiplier). Then the Shift Premium = [Base] * [Multiplier]. Now if you had to update the base or multiplier in the future, you only have to make the change in one place.
I hope you find this useful. Workflow attached,
