Contents / CRM / Adjusting profile fields
Setting rules for fields
APRO CRM allows logical and mathematical associations among profile fields.
For instance, you can get automatic pricing for one square meter depending on the apartment cost and its net area. You can also set the system to send an external request and deliver city district and subway station any time a city and a street address are entered into the CRM.
Go to Main menu — Settings — CRM — Objects and select the type of objects (for example, "Commercial property"), then click upper tab "Rules of associating fields data":
The rules syntax is either JS or PHP.
Creating a JS rule
JS rules are effective in the browser and serve to associate fields:
Creating a PHP rule
PHP rules are effective on the server, including data import/export:
Sample syntax of a PHP rule:
function($req){if ($req["field1506"] == "yes") //field type: text, numeral, single choice{$req["field1618"] = $req["field728"];$req["field1629"] = ""; }if (array_search("yes", $req["field1507"])!== false) //field type: multiple choice, return array{$req["field1618"] = "12345678";} return $req;}
Back to Contents