Hello,
which formula will allow me to filter the recordings by indicating a date?
the entity containing the records and the "date" field:
the gallery that I'm going to filter:
Thanks for your help,
What you show in the screen shot is patient Of. That is already included in the formula. Check my last reply
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi @eka24 ,
Yes, I used your formula. Here are the mistakes it showed me.
Insert a Textbox and name it TextBox1.Text .
If you give it another name the replace TextBox1.Text with that name
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
The errors come from you formula which is wrong. So the first condition is not a separate line here, but part of the rest of the formula.
Know that a comma in the formula is like an And by itself, so it is smart to use comma's to separate the individual conditions. This will make formula's easier to read and also when the first condition results in a false will stop the second condition to run.
For your case this would result in:
Sort(
Filter(Consultation
,Patient_ID=TextBox1.Text
,Or(IsBlank(DatePicker1.SelectedDate), Text(Date,ShortDate)=Text(DatePicker1.SelectedDate,ShortDate))
)
, Date
, Ascending
)
What the Or() does in the second condition is first to check on the data picker being blank and if this is the case results in a true always.
Hope this helps.
hi @KroonOfficeSol @eka24 ,
I inserted the textbox and renamed it like you told me @eka24
then I inserted the formula of @KroonOfficeSol , I have no more errors but nothing is displayed as a result.
I have a question for honesty I did not understand, the textbox is supposed to return what as information ?
Thank you for your help,
That your gallery is empty is logic, this because the textbox is probably empty. So there is no match I would expect.
Also, I could imagine you would like to change the first condition to something like StartsWith(), because else there will only be a match on the full name.
Then you come to the next problem here, let's say you have more record on one patient and there is a typo in the name. This then won\t show up. So basically you probably want to create a patient entity with a one to many relationships to the Consultation entity.
Also, I see an orange triangle, what does this say?
User | Count |
---|---|
125 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
215 | |
180 | |
139 | |
97 | |
83 |