hmmm what exactly are you trying to do? (using the character @ in a field name is fraught with danger - don't)
Just a guess here:
TextFormatRemove (Filter (GetField ( Get ( ActiveFieldTableName ) & "::" & Get ( ActiveFieldName ) ) ); "0123456789")
Hi guys, thanks for the replies,
Phil i havent been in the office today so havent had a chance to try your suggestion.
The script is to validate a phone number, and the script step that i am stuck on is the first if statement. The whole of the first if statement is:Let(@Numbers = TextFormatRemove (Filter(Get ( ActiveFieldName ); "0123456789"));Length(@Numbers) ≠ 11)Basically instead of having to adapt the script everytime i use it for a different phone number field i want it to be generic, i.e.instead of specifying Employees::work_phone within the script i want to use the get(active table name) and the get (active field name) to calculate the field name and come out with the result of Employees::work_phone.
Personally, in most cases, I wouldn't have more than one phone number field that I'd place in a related table of phone numbers, but what I suggested earlier should work for what you want to do here.
I just tried out your solution and it works perfectly, thank you very much.
The reason i wanted a 'generic' phone number validation script is because i will have two tables, one to log employee details and one to log company details. The solution will then be issued to my clients and should i need to make a change to the script in the future i wanted to ensure that i then didnt have to make changes hundreds of field references.