We have added a new system to allow creating rich interactive content with no code. Please see the video explaining below and send feedback in this thread
this is just super cool
@steve I think the conditional logic feature is amazing would be uber cool if you could, at some point show us how this might work in a real life example? e.g. can this be used for quizzes and polls? or something along those lines? or which usecases would you use this for? dropdowns maybe?
is it possible to chain multiple if else
ex: i have pass, fail and warning state which i want to show different bg for each and the data is dynamic that comes from api ? i was able to do it with pass and fail but not sure how to do it for warning
@amanuel.tadesse Yes, it is indeed possible to chain multiple if-else statements. Providing us with more context on your requirement and implementation would be greatly appreciated and allow us to offer you further assistance if needed. Thanks.
basically i have a button and am fetching data from API… in my api response i have 3 kind of status “FAIL”,“PASS”,“WARNING”
ex: {
...,
status:"PASS"
}
now based on the status am trying to change the background of the button as of now my solution is to use background property to bind the dynamic date but this only support 2 conditions but i have 3 variants
Hello @amanuel.tadesse,
If you are facing this situation, you might want to consider using the custom code option. Here’s an example code
let bgColor = "#fff"; // Default color
if (state.status === "FAIL") {
bgColor = "red";
} else if (state.status === "PASS") {
bgColor = "green";
} else {
bgColor = "yellow";
}
return bgColor;