Difference between revisions of "Autofills"

From Ezadspro Wiki
Jump to: navigation, search
Line 71: Line 71:
 
|- id="emph" style="align: middle;"
 
|- id="emph" style="align: middle;"
 
|
 
|
''<nowiki>query selection([lineage];[lineage]bodytype="Truck";*)</nowiki><br>
+
''<nowiki>query selection([lineage];[lineage]bodytype="Truck";*)</nowiki><br>''
<nowiki>query selection([lineage];|;[lineage]bodytype="Van";*)</nowiki><br>
+
''<nowiki>query selection([lineage];|;[lineage]bodytype="Van";*)</nowiki><br>''
<nowiki>query selection([lineage];|;[lineage]bodytype="SUV")</nowiki><br>
+
''<nowiki>query selection([lineage];|;[lineage]bodytype="SUV")</nowiki><br>''
<nowiki>order by formula([lineage]; lowercase([lineage]make); >;</nowiki><br>
+
''<nowiki>order by formula([lineage]; lowercase([lineage]make); >;</nowiki><br>''
<nowiki>lowercase([lineage]model); >; PM2_Order_Zero_At_End([lineage]numericprice);            </nowiki>''
+
''<nowiki>lowercase([lineage]model); >; PM2_Order_Zero_At_End([lineage]numericprice);            </nowiki>''<br>
<br><nowiki>
+
<br><br><nowiki>
 
multi-sort using the workflow pagination section that
 
multi-sort using the workflow pagination section that
 
will filter out trucks, cars, and vans and then sort them by make, model,
 
will filter out trucks, cars, and vans and then sort them by make, model,
 
and price</nowiki><br><nowiki>                                            </nowiki>
 
and price</nowiki><br><nowiki>                                            </nowiki>
 
|}
 
|}

Revision as of 15:36, 28 June 2016

Below is a list of helpful autofills you can use to customize templates:
''If you require a list of the possible fields please add "/field_names.a4d to the server URL e.g. "http://payg.ezadspro.co.uk/field_names.a4d"

If a field is not in use then use another

<%If([Lineage]internet_description="")%> <%write("{{character2}}"+[Lineage]Strap_line+", "+[Lineage]PropertyAddress+", "+[Lineage]Area+", "+[Lineage]Town+", "+[Lineage]County+"{TAB}")%> <%else%> <%write("{{character1}}"+[lineage]internet_description)%> <%end if%>

i.e If internet description is not in use then apply style character2 followed by the strap line, address, area, town and county.

Otherwise use character1 style and the internet field


Formatting a numeric price

<%=string([lineage]numericprice;"£###,###,##0")%>

i.e user inputs 342455 and £342,455 is outputted


Formatting an abbreviated year

\U2019<%substring([Lineage]Year;3;2)%>

i.e user inputs 2016 and 16 is outputted


If a flash exists

<% If([Lineage]flash_1#"") %><% write([lineage]flash_1) %><% else %><% write([lineage]price)%><% end if %>

i.e (Flash 1 contains text) - SOLD
i.e (Flash 1 is empty) - £20,000


Change a flash character style by text

<% If([Lineage]Flash_11="brown”)%><% write("{{brown}}" + [Lineage]Flash_11) %><% else %><% write("{{red}}"+[Lineage]Flash_11)%><% end if %>

i.e user inputs "brown" into Flash 11 - The flash uses character style "brown"
Otherwise any other text into the flash it will use the "red" character style


Change a flash character style by text

query selection([lineage];[lineage]bodytype="Truck";*)
query selection([lineage];|;[lineage]bodytype="Van";*)
query selection([lineage];|;[lineage]bodytype="SUV")
order by formula([lineage]; lowercase([lineage]make); >;
lowercase([lineage]model); >; PM2_Order_Zero_At_End([lineage]numericprice);


multi-sort using the workflow pagination section that will filter out trucks, cars, and vans and then sort them by make, model, and price