# P_setgroupvar
## Syntax:
@setgroupvar**({group}, {key}, {value})**
## Use Case:
Sets a group-scoped variable inline and returns the value. Useful inside expressions.
## Arguments:
- **{group}**: The delegation group name.
- **{key}**: The variable name.
- **{value}**: The value to store.
## Examples:
1. **/showme {Set target to @setgroupvar(A, target, Jimmy)}**
## See Also:
groupvar, /groupvar, G_CrossSessionData
