I fully believe this might be impossible and I may need to completely change the approach I took to my database and lists within my app - but here it goes.
I need to take the numbers from a string, sometimes more than one an example being:
- Chicken Bake (45g Carbs)
- Chicken Soup (25g Carbs)
I then need to be able to divide these using a ratio (Insulin to Carb Ratio) inputted by the user such as 1 (unit of insulin) to 10 (g of carbs) (1:10)
In this case, I would need the result to show 7 Units of Insulin.
I think the issue here is that I opted to include the numbers in the same string as the words in the list. It would be amazing if somebody could tell me how I could extract the numbers from this string or whether I just need to take a different route with the database (less than ideal). The closest subject Iāve found was this:
http://community.thunkable.com/t/how-to-extract-numbers-from-incoming-sms-message/24698
But I donāt think it quite translates.
Here is the lists in question with the numeric data within the strings - as you can see when the items are chosen users can move to a page where in calculation shall be completed - and the results should be displayed in the label where it reads āRecommended Units of Insulinā.
Here are my blocks so far:
!!
Thank you for any help you can provide!