⧼vector-jumptocontent⧽

Float field: Difference between revisions

From EPrints Documentation
m Reverted edit of JxqP6i, changed back to last version by Tajoli
Added examples. Improved other sections unhide ToC.
Line 1: Line 1:
{{fieldtypes}}
{{fieldtypes}}
__NOTOC__
 
 
== Inheritance ==
== Inheritance ==
* [[Metadata]]
* [[Metadata]]
** [[Float field]]
** [[Float field]]


== Description ==
== Description ==
 
Stores a floating point number (may be negative). In 3.0 there is no way to search these values. They might as well be just strings, but they are stored as <tt>FLOAT</tt> in the database.  
Stores a floating point number (may be negative). In 3.0 there is no way to search these values. They might as well be just strings, but they are stored as FLOAT in the database.  


This field is used for the latitude and longitude built in fields in [[User Object]]s and [[EPrint Object]]s.
This field is used for the latitude and longitude built in fields in [[User Object]]s and [[EPrint Object]]s.
Line 15: Line 14:


== Properties ==
== Properties ==
 
No bespoke properties.
No extra properties.


== Required Phrases ==
== Required Phrases ==
 
No additional phrases.
None.


== Database ==
== Database ==
Float fields are stored in the database as
fieldname FLOAT


Float fields are stored in the database as
== API ==
See [[API:EPrints/MetaField/Float|API page]].


  fieldname FLOAT
== Examples ==
Most basic example.
  {
    name => 'impactfactor',
    type => 'float',
},
Limit the width of the input field.
{
    name => 'latitude',
    type => 'float',
    input_cols => 15,
}

Revision as of 16:28, 20 March 2023


Inheritance

Description

Stores a floating point number (may be negative). In 3.0 there is no way to search these values. They might as well be just strings, but they are stored as FLOAT in the database.

This field is used for the latitude and longitude built in fields in User Objects and EPrint Objects.

The usefulness of this field will be expanded in later versions of EPrints.

Properties

No bespoke properties.

Required Phrases

No additional phrases.

Database

Float fields are stored in the database as

fieldname FLOAT

API

See API page.

Examples

Most basic example.

{
    name => 'impactfactor',
    type => 'float',
},

Limit the width of the input field.

{
   name => 'latitude',
   type => 'float', 
   input_cols => 15,
}