Hi there,
I have added two date pickers to filter a gallery but I am getting this error message: "Error when trying to retrieve data from the network". The query runs when I take the date picker code out.
I found this related community post and attempted to correct my query - LINK
It mentions using Value(DatePicker.Value) - but Value is not recognized which is why I stuck with SelectedDate.
My SQL table date is formatted "yyyy-mm-dd" and data type Date, so I set the FORMAT property of my date pickers to match.
Still getting the error message when I run it. No errors are thrown when writing it.
Any thoughts or suggestions?
Thanks!
FirstN(
If(
IsBlank(stST_KTN.Text),
If(
IsBlank(stST_ID.Text),
If(
IsBlank(stST_Data.Text),
Filter(
EXPL_Sent,
STOID = cbST_STO.Selected.Value || IsBlank(cbST_STO.Selected.Value),
//Date Picker Filters
SentDate >= Value(dpST_DateStart.SelectedDate) || IsBlank(Value(dpST_DateStart.SelectedDate)),
SentDate <= Value(dpST_DateEnd.SelectedDate) || IsBlank(Value(dpST_DateEnd.SelectedDate)),
CID = sdST_C.Selected.IDC || IsBlank(sdST_C.Selected.IDC)
),
Filter(Search(
EXPL_Sent,
stST_Data.Text,
"DataDescription"
),
CID = sdST_C.Selected.IDC
)
),
Filter(
EXPL_Sent,
SentID = Value(stST_ID.Text)
)
),
Filter(
EXPL_Sent,
CID = sdST_C.Selected.IDC,
OKN = stST_KTN.Text ||
AID = Value(stST_KTN.Text) ||
AIDold = Value(stST_KTN.Text)
)
),
2000
)
FirstN(
If(
IsBlank(stST_KTN.Text),
If(
IsBlank(stST_ID.Text),
If(
IsBlank(stST_Data.Text),
Filter(
EXPL_Sent,
STOID = cbST_STO.Selected.Value || IsBlank(cbST_STO.Selected.Value),
//Date Picker Filters
SentDate >= Value(dpST_DateStart.SelectedDate) || IsBlank(Value(dpST_DateStart.SelectedDate)),
SentDate <= Value(dpST_DateEnd.SelectedDate) || IsBlank(Value(dpST_DateEnd.SelectedDate)),
CID = sdST_C.Selected.IDC || IsBlank(sdST_C.Selected.IDC)
),
Filter(Search(
EXPL_Sent,
stST_Data.Text,
"DataDescription"
),
CID = sdST_C.Selected.IDC
)
),
Filter(
EXPL_Sent,
SentID = Value(stST_ID.Text)
)
),
Filter(
EXPL_Sent,
CID = sdST_C.Selected.IDC,
OKN = stST_KTN.Text ||
AID = Value(stST_KTN.Text) ||
AIDold = Value(stST_KTN.Text)
)
),
2000
)

Report
All responses (
Answers (