function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maksym MarshaliukMaksym Marshaliuk 

Extract numbers from string

I stuck on a problem that I don't know what formula do I need to enter in Winner field to represent name of winner team(on screenshots) or Draw if score is equal. Winner is a field on Match object. They told me that I need to parse it somehows but I don't know. I also would be grateful for helping me with the last field "Previous Match Between Teams Datetime" because I don't know what formula I need to write there tooUser-added imageUser-added image
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you confirm what is given in Score field and what excatly you want it in Winner field so we can help you on the formula.


Thanks,
 
Maksym MarshaliukMaksym Marshaliuk
I attached screenshots with full task. Score is a text field which represents score '(1:2' as example). 1 - score of Home team, 2- score of Visitors, that is Visitors won. Through fields 'Home Team' and 'Visitors' we can access to Team object and display Name of winner team. Home Team and Visitors are Master-detail and lookup fields respectively(to Team object).  You can see all fields and objects on my screenshots