I am trying to create a condition to determine when a type of a query filter is triggered or when another type is triggered, Please how do I achieve this?
let x;
let itemobjowner = $w(“#datasetowner”).getCurrentItem()
if( $w ( “#inputmonth” ). value ===“all”){
x = .isNotEmpty(“entrymonth”)
chart()}
else if( $w ( “#inputmonth” ). value !==“all”){
x = . eq ( “entrymonth” ,( $w ( “#inputmonth” ). value ))
chart()}
function chart(){
let chartlogger = wixData . query ( “LOG” )
.eq(“_owner”,itemobjowner._owner)
x / /replace this alone based on conditions above
Promise . all ([ chartlogger.limit ( 1000 ). find ()])
. then ( res =>{})
}
Hi there …
I’ve done a tutorial video about this topic, you can watch it here .
Thanks for your response, your video is quite long, can you post the code here
@chidiejike This forum is not a wishing-center!
Please use the help which is offered, else reach out to…
…to develop your wishing functionality.
Or just take the offered stuff by Ahmad, learn it and create your wished features and functions by your own.
Or perhaps Ahmad find the time to do the JOB for you.