I’m having such a hard time with this.
I have a app that if you choose a value In a drop down list, then type in the search text box that it searches what was typed in that specific column. I also have 2 fields called “publication date”, one is a To and the other is a From. Basically they can choose a set of dates and the gallery would show only those documents that was published between those 2 dates.
im having a hard time putting both these together on the gallery items.
Solved! Go to Solution.
Hi @Km00 ,
Note that the below is syntax guidance and was OCR'd (posting code in Text is always something you should do) and free-typed. So if there are errors please analyze the code and try to resolve before responding.
With(
{
wDoc:cbDocSearch.Selected.Value,
wSearch:SearchDocTitle.Text
},
Sort(
Filter(
'New Item Only Action Log’,
'publication date' >= YourStartDate &&
'publication date' <= YourEndDate &&
(
IsBlank(wSearch) ||
Switch(
wDoc,
"Document Title",
wSearch in Doc_Title_DisplayName,
"Document Owner",
wSearch in Doc_Owner_DisplayName,
"Document Owner Designee",
wSearch in DO_Designee_DisplayName,
"Document Owner’s Team",
wSearch in SO_Dept_DisplayName
)
)
),
Doc_Title,
Ascending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Km00 ,
Note that the below is syntax guidance and was OCR'd (posting code in Text is always something you should do) and free-typed. So if there are errors please analyze the code and try to resolve before responding.
With(
{
wDoc:cbDocSearch.Selected.Value,
wSearch:SearchDocTitle.Text
},
Sort(
Filter(
'New Item Only Action Log’,
'publication date' >= YourStartDate &&
'publication date' <= YourEndDate &&
(
IsBlank(wSearch) ||
Switch(
wDoc,
"Document Title",
wSearch in Doc_Title_DisplayName,
"Document Owner",
wSearch in Doc_Owner_DisplayName,
"Document Owner Designee",
wSearch in DO_Designee_DisplayName,
"Document Owner’s Team",
wSearch in SO_Dept_DisplayName
)
)
),
Doc_Title,
Ascending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
You are phenomenal!!! That worked, thank you so much. This has taken me way too long and I just couldn’t get it. I appreciate you.
@WarrenBelz I have one more thing on this , they want me to add to this bowl of crazy:
if a drop down field called “view” is changed to “My Documents “, the gallery changes to any document that has in its “doc_owner” column or “do_designee” column that has my name in (or whatever user is signed into the app) to show. Then there is a “all documents” in that dropdown which shows everything. Attached is what I have so far.
Sorry for the delay:
I was able to do the following and it seems to be working okay:
With({
wDoc:cbDocSearch.Selected.Value,
wSearch:SearchDocTitle.Text,
wFromDate: DateFrom.SelectedDate,
wToDate: DateTo.SelectedDate,
wView: cbDocView.Selected.Value
},
Sort(
Filter(
Filter('New Item Only Action Log',
varView=false ||User().FullName in DO_Designee.DisplayName || User().FullName in Doc_Owner.DisplayName || cbDocView.Selected.Value="All Documents"),
Publication_Date >=DateFrom.SelectedDate &&
Publication_Date <= DateTo.SelectedDate &&
(
IsBlank(wSearch) ||IsBlank(wDoc) || IsBlank(wFromDate) || IsBlank(wToDate) ||
Switch(
wDoc,
"Document Title",
wSearch in Doc_Title,
"Document Owner",
wSearch in Doc_Owner_DisplayName,
"Document Owner Designee",
wSearch in DO_Designee_DisplayName,
"Document Owner's Team",
wSearch in SO_Dept_DisplayName
)
)
),
Doc_Title,
Ascending
)
)
User | Count |
---|---|
174 | |
110 | |
86 | |
44 | |
42 |
User | Count |
---|---|
229 | |
118 | |
118 | |
74 | |
67 |