You need to sign in to do that
Don't have an account?
Sanjana Rajasekar 9
Extract Numbers From Text Values in Flows
Hi,
I have a Text Field (Cost Group) and Discount Field (Discount). I am using a record triggered flow . I need to process the cost group values to extract only the numbers and update to the Discount fields.
Examples of Cost group field values: Air 20, AIR/HUG80, ZM 60%
How can I use this logic in the record triggered flow without using any apex classes.
Thanks
Sanjana
I have a Text Field (Cost Group) and Discount Field (Discount). I am using a record triggered flow . I need to process the cost group values to extract only the numbers and update to the Discount fields.
Examples of Cost group field values: Air 20, AIR/HUG80, ZM 60%
How can I use this logic in the record triggered flow without using any apex classes.
Thanks
Sanjana
Can you try implementing the logic similar to this.
https://blog.certifycrm.com/salesforce-flow-strip-text-from-a-number/
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
Do you need to extract only numbers from the strings like.
From AIR 20 it should return 20
From AIR/HUG80 it should return 80
For Discount field it should return
From ZM 60% it should return 60.
Can you confirm Cost Group does not contain % at the end and contains numbers only in Last two digits and Discount Field will contain last three digits as number%.
Thanks,
Yes, I need to extract only the numbers from the string. Cost group also containes % at the end and It also contains digits in middle of the String (Eg: AIR 50 ER must return 50 ) . Discount Field will contain only Extracted Number.
Thanks
Sanjana
Can you try implementing the logic similar to this.
https://blog.certifycrm.com/salesforce-flow-strip-text-from-a-number/
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
This formula removes any spaces, forward slashes, and percentage signs from the Cost Group field value, leaving only the numbers. The TRIM function removes any leading or trailing spaces that might have been left after removing the characters.
4. Add an Assignment element to the flow to update the Discount field with the extracted numbers. Here's the formula you can use:
This formula simply references the output of the Formula element that you created in step 3.
Save and activate the flow.
Now, when a record is created or updated, the flow will run and update the Discount field with the extracted numbers from the Cost Group field.
Note that this solution assumes that the numbers in the Cost Group field are always followed by a non-numeric character, such as a space, forward slash, or percentage sign. If this is not always the case, you may need to adjust the formula accordingly to handle different scenarios.
---
Check also: Manok na pula mod apk
Thank you for your formula. I have one similar request. I have one field where values are like this Orange-13, Banana-21, Yellow-24. And these values are dynamic. I have one requirement like extracting these values and multiply with 12 and then concatenate again like Orange - 156. Do you have any idea how can we do it in flow