Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8076

Switch or case

$
0
0

Hi I have two tables as below ; which are input for my report .First Table is Invoice second Table is Messages

 

keyLanguageRegion
1EnglishUSA
2EnglishUSA

 

LanguageRegionSortOrderMessage
EnglishUSA1ABCDEFG IJKLMNOP ...
EnglishUSA2QRST UVW
EnglishUSA3XYZ

 

I want to create three custom Formula Fields(Message1,Message2,Message3) which is by SortOrder  column as a condition for a report.

 

In the end when I look at  SQL Query on the report, the query result should look like as below.

 

KeyLanguageRegionMessage1Message2Message3
1EnglishUSAABCDEFG IJKLMNOP ...QRST UVWXYZ
2EnglishUSAABCDEFG IJKLMNOP ...QRST UVWXYZ

 

I tried to create 'Message1' formula field as below and dropped on Report .I ended up getting duplicates.

 

if({Invoice.Language}='English' and {Invoice.Region}='USA' and {Messages.SortOrder}=1) then  {Messages.Message}


Viewing all articles
Browse latest Browse all 8076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>