# Create more than one same entity in a single intent and getting their value in actions.py

**URL:** <https://forum.rasa.com/t/create-more-than-one-same-entity-in-a-single-intent-and-getting-their-value-in-actions-py/58056>\
**Category:** Rasa Open Source\
**Created:** [April 20, 2023, 9:49am UTC](https://forum.rasa.com/t/create-more-than-one-same-entity-in-a-single-intent-and-getting-their-value-in-actions-py/58056 "2023-04-20T09:49:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mani079](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Mani079](https://forum.rasa.com/u/Mani079)\
**Post date:** [April 20, 2023, 9:49am UTC](https://forum.rasa.com/t/create-more-than-one-same-entity-in-a-single-intent-and-getting-their-value-in-actions-py/58056/1 "2023-04-20T09:49:03Z")

</div>

Hi,

Can we give more than one same entity name in a single intent and get those values in actions.py. If so how to do that.

```auto
- intent: get_total_class
  examples: |
    - what is the total marks of [David](name) and [Mark](name) ?

```

in actions.py

```auto
class ActionGetMarks(Action):

    def name(self) -> Text:
        return "get_total_class_marks"

    def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

        Where_Condition = next(tracker.get_latest_entity_values('name'), None)
        Where_Condition = Where_Condition.replace("and", " ',' ")
        Where_Condition = "'"+Where_Condition+"'"
        Query = "SELECT sum(Marks) from Students Where Name IN ("+Where_Condition +")"

        dispatcher.utter_message(text=Query )

        return []

```

So i need my Query to be something like this

```auto
SELECT sum(Marks) from Students Where Name IN ('David', 'Mark')

```
