Sep 01, 2023 07:22 AM - edited Sep 02, 2023 06:19 AM
I am trying to have different items use different formula code, specifically to modify locks codes that will be different based on date from users and the limitations of each lock. I set up a list of locks and wrote and tested formulas that check for deficiencies in the lock codes that are created from the users phone numbers. An example is if the lock code starts with a "0", the lock with not accept the code. So there is code that looks for a "0" and replaces it with a "1". So if the users code was "0234" the code will change it to.. "1234".
IF({Code},IF(LEFT({Code},1)=0,CONCATENATE(1,RIGHT({Code},3)),{Code}),ROUND((VALUE(DATETIME_FORMAT(CREATED_TIME(), '0.smh'))*(9999-1001))+1001,0))
Also if for some reason there is no code present, a random code is generated.
This code has been tested and lives in a text column in another table, my hope was to use a look up to use this formula code when it applies.
I have the lock code associate with a given rental property, the reservation at that property, and the customers phone number... Ideally I could pull this code in look-up, and run it in a column..
But so far, it just pulls the formula in as if it is concatenated...
wondering if there is an escape character, that might allow the looked-up text to get executed as a formula.
Sep 05, 2023 08:52 AM
The short answer is a qualified no - while there might be a way to do this with a script, you can’t have a formula that exists as a text field in one place behave as a formula in another.