Hi,
Googling this one isnt much fun with the word "With", Im using the following piece of code to filter my gallery by the current user, it works however i also wish to use the search text function?
Could someone show me where it goes?
With(
{wUser: User().FullName},
SortByColumns(
Filter(
Interactions,
NewCreatedBy.DisplayName = wUser
),
"Created",
If(
SortDescending1,
Ascending,
Descending
)
)
)
I do know i can put it here
With(
{wUser: User().FullName},
SortByColumns(
Filter(
Interactions, NewCreatedBy.DisplayName = wUser ,
StartsWith(Discussion, TextSearchBox1_1.Text)
),
"Created",
If(
SortDescending1,
Ascending,
Descending
)
)
)
But then i get delagation issues, which is why im using With in the first place?
Solved! Go to Solution.
There is really no need to use With() on that code (although it is an extremely useful function (refer this blog of mine)
SortByColumns(
Filter(
Interactions,
NewCreatedBy.DisplayName = User().FullName
),
"Created",
If(
SortDescending1,
Ascending,
Descending
)
)
However, you can use it like this to manage Delegation on the Search function (note the With() output record numbers need to be under your Delegation limit)
With(
{
wList:
SortByColumns(
Filter(
Interactions,
NewCreatedBy.DisplayName = User().FullName
),
"Created",
If(
SortDescending1,
Ascending,
Descending
)
)
},
Search(
wList,
YourSearchBoxName.Text,
"SearchedField1",
"SearchedField2"
)
)
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.
Visit my blog Practical Power Apps
There is really no need to use With() on that code (although it is an extremely useful function (refer this blog of mine)
SortByColumns(
Filter(
Interactions,
NewCreatedBy.DisplayName = User().FullName
),
"Created",
If(
SortDescending1,
Ascending,
Descending
)
)
However, you can use it like this to manage Delegation on the Search function (note the With() output record numbers need to be under your Delegation limit)
With(
{
wList:
SortByColumns(
Filter(
Interactions,
NewCreatedBy.DisplayName = User().FullName
),
"Created",
If(
SortDescending1,
Ascending,
Descending
)
)
},
Search(
wList,
YourSearchBoxName.Text,
"SearchedField1",
"SearchedField2"
)
)
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.
Visit my blog Practical Power Apps
User | Count |
---|---|
257 | |
127 | |
104 | |
49 | |
49 |