Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Up to 100,000 records can be processed with the freeware version!
Flowheater Chart

If-then-else for another field

  • Richard Barnett
  • Topic Author
  • Offline
  • User
  • User
More
7 years 4 weeks ago #3393 by Richard Barnett
If-then-else for another field - Post(3393) was created by Richard Barnett
Hi.
I am having trouble finding an example of an if-then-else where the if query relates to a different field. So my data is something like this

SKU Brand Price
123 Brother $100
124 Epson $110
125 Epson $120
126 HP $130
So I want to calculate
IF Brand = Epson then Multiply Price by .99 and
IF Brand = HP then Multiply Price by .98
else keep the same price.

Can you help with this?
Thank you

Please Log in or Create an account to join the conversation.

More
7 years 4 weeks ago #3394 by FlowHeater-Team
Replied by FlowHeater-Team on topic If-then-else for another field - Post(3394)
Hi Richard,

You have to use a Condition chain. The First IF-THEN-ELSE Condition just have the rule “Brand” = HP. Wether is YES the calculatet values goes out in case of NO the original value are the result. The second IF-THEN-ELSE Condition use the rule “Brand” = Epson. In case of yes the price will be calculate in case of NO the value form the first condition will be used. That´s all.

Attached you´ll find an example how it´s work. In the example I also used the .NET Script Heater and a little script.

Here you´ll find two more detailed examples:
Simple If-Then-Else example
Complex If-Then-ElseIf example




File Attachment:

File Name: calc-condition.zip
File Size:3 KB

Best wishes
Robert Stark

Please Log in or Create an account to join the conversation.

  • Richard Barnett
  • Topic Author
  • Offline
  • User
  • User
More
7 years 3 weeks ago #3395 by Richard Barnett
Replied by Richard Barnett on topic If-then-else for another field - Post(3395)
Hi there.
Thanks very much for that. Once I set up the New Price field it all worked great.
The .NET script version works fine too - this .NET version is easy to add other brands if I wish.

Please Log in or Create an account to join the conversation.

Time to create page: 0.266 seconds
FlowHeater Logo

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Legal information

Support & Contact

Contact

Phone:
0951 / 9933 9792

eMail:
This email address is being protected from spambots. You need JavaScript enabled to view it.


Copyright © 2009-2024 by FlowHeater GmbH. All rights reserved.