Question: I am working on some Forms and Report Builder written in Java which can run on Android as well. At least the Forms and Reports executer. Users can enter simple groovy scripts, which can change simple variables. Now my problems is that groovy won't really work on Android. Is any way that I use instead of Groovy another language. 
Requirements : 
- that language should be compiled and executed in Java
- pass and read variables to the scripts
- the resulted bytecode should run on Android as well, or eventual directly compiled and executed in Android

Answer: 
```
<document name="Index">  
<entity name="c" transformer="TemplateTransformer" query="SELECT * FROM C">  
  <field column="Name" name="name"/>  
  <field column="id" template="1"/>  
</entity>  
<entity name="p" transformer="TemplateTransformer" query="SELECT * FROM P">  
  <field column="Name" name="name"/>  
  <field column="id" template="1"/>  
</entity>  
</document> 

```
You can add a column to your SQL query that contains static data like this:

```xml
<document name="Index">  
  <entity name="c" query="SELECT *, 'foo' as NameFromC FROM C">  
    <field column="NameFromC" name="name"/>
  </entity>

  <entity name="p" query="SELECT *, 'bar' as NameFromP FROM P">  
    <field column="NameFromP" name="name"/>
  </entity>  
</document>

```

If you try to add a field with only `name` and `template` attributes, Solr will throw an error saying *Field must have a column attribute*.