Hi Waad,
1. Create an attribute in the entity e.g. WordCounter (Integer).
2. On change event, call a microflow (just because we need to use StringSplit java action from CommunityCommons)
3. In the microflow:
- First check $entity/attribute is not empty, e.g. $entity/attribute != empty and trim($entity/attribute) != ''
- Then, create a string variable named 'VarInput' with replaceAll(trim($entity/attribute), ' ', '~')
- In the next activity, call the StringSplit java action, pass input string VarInput and SplitParameter as '~'
- Once you get the list of items, then you can use Aggregate list activity to get the count
- Change the entity where WordCounter attribute exists. Do not commit the entity
- Use the attribute WordCounter to show on the UI
Thanks