Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Back to post

Revisions 3

one year ago
Yong Sheng Tan
39 × 2 Administrator
Any ability to capture @someone and store it into a variable?
Any ability to capture @someone and store it into a variable?
From your use of underscores, I assume you're using the Python BDK. You can use the slash command decorator and include an @mention as an argument in your pattern. https://symphony-bdk-python.finos.org/markdown/activity-api.html#slash-command-pattern-format For example, ```python @activities.slash("/ping {@person}") async def on_echo_mention(context: CommandContext): person = context.arguments.get_mention("person") name = person.user_display_name uid = person.user_id await bdk.messages().send_message(context.stream_id, f"Hello <mention uid=\"{uid}\" />") ``` There's no need to do any validation since an @mention will always resolve to an actual user. However, this could be either an internal or external user - so be wary of using the user id immediately to create a new IM and send a message if your bot isn't connected to the external user.
From your use of underscores, I assume you're using the Python BDK. You can use the slash command decorator and include an @mention as an argument in your pattern. https://symphony-bdk-python.finos.org/markdown/activity-api.html#slash-command-pattern-format For example, ```python @activities.slash("/ping {@person}") async def on_echo_mention(context: CommandContext): person = context.arguments.get_mention("person") name = person.user_display_name uid = person.user_id await bdk.messages().send_message(context.stream_id, f"Hello <mention uid=\"{uid}\" />") ```
one year ago
Yong Sheng Tan
39 × 2 Administrator
Any ability to capture @someone and store it into a variable?
Any ability to capture @someone and store it into a variable?
From your use of underscores, I assume you're using the Python BDK. You can use the slash command decorator and include an @mention as an argument in your pattern. https://symphony-bdk-python.finos.org/markdown/activity-api.html#slash-command-pattern-format For example, ```python @activities.slash("/ping {@person}") async def on_echo_mention(context: CommandContext): person = context.arguments.get_mention("person") name = person.user_display_name uid = person.user_id await bdk.messages().send_message(context.stream_id, f"Hello <mention uid=\"{uid}\" />") ```
From your use of underscores, I assume you're using the Python BDK. You can use the slash command decorator and include an @mention as an argument in your pattern. https://symphony-bdk-python.finos.org/markdown/activity-api.html#slash-command-pattern-format For example, ```python @activities.slash("/ping {@person}") async def on_echo_mention(context: CommandContext): person = context.arguments.get_mention("person") name = person.user_display_name uid = person.user_id await bdk.messages().send_message(context.stream_id, f"Hello <mention uid=\"{uid}\" />") ```
one year ago
Original
Yong Sheng Tan
39 × 2 Administrator
Any ability to capture @someone and store it into a variable?

From your use of underscores, I assume you're using the Python BDK. You can use the slash command decorator and include an @mention as an argument in your pattern. https://symphony-bdk-python.finos.org/markdown/activity-api.html#slash-command-pattern-format For example, ```python @activities.slash("/ping {@person}") async def on_echo_mention(context: CommandContext): person = context.arguments.get_mention("person") name = person.user_display_name uid = person.user_id await bdk.messages().send_message(context.stream_id, f"Hello <mention uid=\"{uid}\" />") ```