# How to properly get multiple tags with GetDevicesWithTags? With Feedback.

**URL:** <https://forums.unrealengine.com/t/how-to-properly-get-multiple-tags-with-getdeviceswithtags-with-feedback/782990>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite\
**Created:** [March 3, 2023, 2:22pm UTC](https://forums.unrealengine.com/t/how-to-properly-get-multiple-tags-with-getdeviceswithtags-with-feedback/782990 "2023-03-03T14:22:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AxelCapek](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axelcapek/32/950074_2.png) [@AxelCapek](https://forums.unrealengine.com/u/AxelCapek)\
**Post date:** [March 3, 2023, 2:22pm UTC](https://forums.unrealengine.com/t/how-to-properly-get-multiple-tags-with-getdeviceswithtags-with-feedback/782990/1 "2023-03-03T14:22:00Z")

</div>

This is both a question _and_ feedback!

**Question** : How do we get multiple tags using `GetDevicesWithTags`?

Currently you can `GetDevicesWithTag` easily like so:

`MyDevice := GetDevicesWithTag( MyTag{} )`.

This works nicely, however its not clear how to get multiple tags! First, we need a new function. I don’t believe 2 seperate functions should be needed, instead keep a single function of `GetDevicesWithTags` that works with both single and multiple tags.

The cleanest and most logical way for me to do this would be like so:

For a single tag:  
`MyTaggedDevice := GetDevicesWithTags( array = { MyTag1{} } )`  
For multiple tags:  
`MyTaggedDevices := GetDevicesWithTags( array = { MyTag1{}, MyTag2{} } )`

---

<div class="post-metadata">

**Author:** ![prodkjonsson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@prodkjonsson](https://forums.unrealengine.com/u/prodkjonsson)\
**Post date:** [March 13, 2023, 11:22am UTC](https://forums.unrealengine.com/t/how-to-properly-get-multiple-tags-with-getdeviceswithtags-with-feedback/782990/2 "2023-03-13T11:22:01Z")

</div>

Hi,

To query for objects in more complex ways than just using a single tag the way to do it is currently using the `GetCreativeObjectsWithTags` function with a `tag_search_criteria`:

```auto
# All creative objects with MyTag1
ObjectsWithMyTag1 := GetCreativeObjectsWithTag( MyTag1{} )

# All creative objects with MyTag1 AND MyTag2
ObjectsWithMyTag1AndMyTag2 := GetCreativeObjectsWithTags(tag_search_criteria{RequiredTags := array{MyTag1{}, MyTag2{}}})

# All creative objects with MyTag1 OR MyTag2
ObjectsWithMyTag1OrMyTag2 := GetCreativeObjectsWithTags(tag_search_criteria{PreferredTags := array{MyTag1{}, MyTag2{}}})

# All creative objects with MyTag1 OR MyTag2 that do NOT have MyTag3
ObjectsWithMyTag1ORMyTag2ButNotMyTag3 := GetCreativeObjectsWithTags(tag_search_criteria{PreferredTags := array{MyTag1{}, MyTag2{}}, ExclusionTags := array{MyTag3{}}})

```

, given tags defined like this:

```auto
MyTag1 := class(tag):

MyTag2 := class(tag):

MyTag3 := class(tag):

```

. Note that what used to be called `GetCreativeDevicesWithTag` is called `GetCreativeObjectsWithTag` in future releases. We will take your feedback regarding just having one function into consideration.

// K

---

<div class="post-metadata">

**Author:** ![AxelCapek](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axelcapek/32/950074_2.png) [@AxelCapek](https://forums.unrealengine.com/u/AxelCapek)\
**Post date:** [March 13, 2023, 11:25am UTC](https://forums.unrealengine.com/t/how-to-properly-get-multiple-tags-with-getdeviceswithtags-with-feedback/782990/3 "2023-03-13T11:25:03Z")

</div>

Thank you for the response!

---

<div class="post-metadata">

**Author:** ![DogOnAKeyboard13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DogOnAKeyboard13](https://forums.unrealengine.com/u/DogOnAKeyboard13)\
**Post date:** [March 6, 2025, 12:30pm UTC](https://forums.unrealengine.com/t/how-to-properly-get-multiple-tags-with-getdeviceswithtags-with-feedback/782990/4 "2025-03-06T12:30:59Z")

</div>

Does this still work in verse? Because it says “GetCreativeObjectsWithTag” is now deprecated and to use FindCreativeObjectsWithTag. I’m trying to use the “tag\_search\_criteria” now with the new function, but it gives some errors like it doesn’t recognize it.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/a/dda11607f4858694d2a7abd48ed1a2ae753a7442.png)

(can ignore the multiple array of tagged items, trying to make a new array called tagged\_beaconList\_all)

---

<div class="post-metadata">

**Author:** ![MrDJ2U](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrDJ2U](https://forums.unrealengine.com/u/MrDJ2U)\
**Post date:** [March 6, 2025, 4:46pm UTC](https://forums.unrealengine.com/t/how-to-properly-get-multiple-tags-with-getdeviceswithtags-with-feedback/782990/5 "2025-03-06T16:46:09Z")

</div>

So this is the function call they used to use from the digest:

```auto
@deprecated
# Deprecated, use `FindCreativeObjectsWithTag` instead.
# Returns an array containing creative objects which have tag(s) matching the specified `SearchCriteria`.
GetCreativeObjectsWithTags<native><public>(SearchCriteria:tag_search_criteria)<transacts>:[]creative_object_interface

```

There is no such overload for ‘FindCreativeObjectsWithTag’. Not sure why they wouldn’t write one. You’ll have to do some extra checking in verse.

this may help:

```auto
# Returns a queryable `tag_view` which can be used to query the tags on `CreativeObject`.
    (CreativeObject:creative_object_interface).GetTags<native><public>():tag_view

```

---

<div class="post-metadata">

**Author:** ![DogOnAKeyboard13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DogOnAKeyboard13](https://forums.unrealengine.com/u/DogOnAKeyboard13)\
**Post date:** [March 7, 2025, 1:50am UTC](https://forums.unrealengine.com/t/how-to-properly-get-multiple-tags-with-getdeviceswithtags-with-feedback/782990/6 "2025-03-07T01:50:24Z")

</div>

omg this will help so much thanks! I will try it out when I get a chance!
