How to use SetValueAsEnum Function?

I’m trying to do some very basic AI decision making by using enums in my Behaviour Tree.

I have in my C++ code a set of enum called State. In the editor I’ve also created a enum. Both with same values and structure (IDEL, RUN, ATTACK). I have also got a Data Asset which a property uses the created Enum in the editor. Now, what I’ve coded is BlackboardComponent->SetValueAsEnum(CurrentState, RUN); where current state is a uint8 but I think I’m pass in the wrong type to the function as it is not doing anything.

Can someone tell me how exactly do I use this SetValueAsEnum() function in C++?

Thanks