I don't know how do explain this , but here goes. i have a select component connected to db table as data source , but when nothing is selected is hows value : any
but I want it to say value:""
. so that I can use an if statement like
PRIORITY_ID === "" ? item.PRIORITY_ID: do something
but because its any even when the first condition is met it is not fulfilled
help please
Hey @jakinda1,
Would you mind sending a screenshot of where are you seeing value : any
?
Also, you should try and reference the value, e.g. PRIORITY_ID.value === "" ? item.PRIORITY_ID: do something
@MiguelOrtiz here is a screenshot:
i want it to say
""
so that the if statement can be checked , I cant use
null
either
ah I see what you mean,
not sure of your broader context, but would something like this work?
let PRODUCTION_STAGE_ID = compilationProductionStage4.value === null ? "" : compilationProductionStage4.value
thats the thing , i dont think retool is registering the any value type as null or as an empty string
I'm not sure if I'm following. It is registering it as null if nothing is selected:
1 Like
Hey @jakinda1
const PRIORITY_ID = selectComponent.value || ""
When component is empty its already assume the PRIORITY_ID as "" blank string, I think its working for you.
1 Like
Hi @jakinda1,
Did either of those approaches work for you?