Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have table below:
Sl num | Is_correct_answer | Question_text | Answer_text |
1 | 0 | what is the national sport of India | Cricket |
2 | 0 | what is the national sport of England | Hockey |
3 | 1 | what is the national sport of Brazil | Football |
4 | 1 | what is the national sport of South Africa | Rugby |
5 | 1 | what is the national sport of China | Table Tennis |
If the Is_correct_answer=0 then, I should append Incorrect before displaying the Answer_text
Is_correct_answer=1 then, I should append Correct before displaying the Answer_text
However, I want to display as below:
Sl Num | Question_text | Updated Answer_text |
1 | what is the national sport of India | Incorrect: Cricket |
2 | what is the national sport of England | Incorrect: Hockey |
3 | what is the national sport of Brazil | Correct:Football |
4 | what is the national sport of South Africa | Correct:Rugby |
5 | what is the national sport of China | Correct:Table Tennis |
Kindly help me in displaying as above.
Are you looking to do this in the script or front end chart? Also, Is_correct_answer a field or a calculation?
Would you be able to provide a screenshot where you have Sl num and is_correct_answer as dimension and the expression proposed by @miskinmaz as your expression?
The code itself looks right... but you are saying it doesn't work?
I don't think I understand. Can you answer the below three questions:
1) Is this method working or not working?
2) If it is working, why are you looking for another method?
3) If it isn't working, can you share a sample where we can see it no working