I need to split info from a text into numbers and text, and find the max value of numbers. For example in TextInput1 I have “5-6 working days”, and I need to extract the number 6 who is the max number of the string. I get the following error :
Expected number; we expected a number at this point in the formula
DataLivrare: Text(
If(
IsNumeric(ThisRecord.Value.'Data livrare'),
Today() + Value(ThisRecord.Value.'Data livrare'),
Today() + Max(
ForAll(
Split(Substitute(ThisRecord.Value.'Data livrare', "-", " "), " "),
If(
IsNumeric(Value), // Check if each part of the split is numeric
Value(Value), // Convert it to a number
Blank() // Ignore non-numeric parts
)
)
)
),
"dd.mm.yyyy"
);
//DataLivrare is DeliveryDate
1