# How to Wildcard Delegates in c++ to blueprints?

**URL:** <https://forums.unrealengine.com/t/how-to-wildcard-delegates-in-c-to-blueprints/504804>\
**Category:** C++\
**Tags:** unreal-engine, delegate, UE4, UE4-27, Blueprint, question\
**Created:** [March 7, 2022, 5:27pm UTC](https://forums.unrealengine.com/t/how-to-wildcard-delegates-in-c-to-blueprints/504804 "2022-03-07T17:27:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Estigio97](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Estigio97](https://forums.unrealengine.com/u/Estigio97)\
**Post date:** [March 7, 2022, 5:27pm UTC](https://forums.unrealengine.com/t/how-to-wildcard-delegates-in-c-to-blueprints/504804/1 "2022-03-07T17:27:42Z")

</div>

Hi, I’m looking for a way to create a delegate that can contain at least one parameter like Wildcard. I am trying to create a predicate to search an array via FilterByPredicate. Honestly I’ve been stuck at this point and I would need some idea to solve it.

```auto
DECLARE_DYNAMIC_DELEGATE_TwoParams(FWildcardFilterDelegate, const UProperty*, Value, bool&, Result);

UCLASS()
class SORTPLUGIN_API USortPluginBPLibraryAdvanced : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
	
	UFUNCTION(BlueprintCallable, meta = (DisplayName = "PredicateFilterWildcard", CompactNodeTitle = "PredicateFilter", ArrayParm = "Array", ArrayTypeDependentParams = "Results", BlueprintThreadSafe, CustomThunk, Keywords = "Filter plugin Array Wildcard Predicate", ToolTip = "Filter an array using a predicate", CustomStructureParam = "Array"), Category = "Filter")
		static void PredicateFilterWildcard(const TArray<UStructProperty*>& Array, const FWildcardFilterDelegate& PredicateFunction, TArray<UStructProperty*>& Results, bool InvertResult = false);
}

```

---

<div class="post-metadata">

**Author:** ![Scienziatogm](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scienziatogm/32/906600_2.png) [@Scienziatogm](https://forums.unrealengine.com/u/Scienziatogm)\
**Post date:** [March 10, 2022, 12:54am UTC](https://forums.unrealengine.com/t/how-to-wildcard-delegates-in-c-to-blueprints/504804/2 "2022-03-10T00:54:41Z")

</div>

Hey Estigio97,  
have you already taken a look at this thread?

> [@\[Tutorial\] How to accept wildcard structs in your UFUNCTIONs](https://forums.unrealengine.com/t/tutorial-how-to-accept-wildcard-structs-in-your-ufunctions/18968):
>
> While working on exposing JSON handling to Blueprint, I really wished I could serialize and deserialize BP structs. I looked around and couldn’t find anything about making an UFUNCTION take wildcards without having to resort to creating a fullly custom K2\_Node class (for which there’s almost no documentation also). I started digging the source and doing some experiments and I finally found a way, which I’m sharing here with you! DISCLAIMER: Use this at your own risk! I haven’t tested this exten…
