Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The Number field contains only numbers. If you are unsure if the expected values may contain text, then use a text field. Otherwise, use the Number field. The benefit is that you can calculate with numbers but not with text. For example, 2+2=4, but "Content" + "tent" is nothing.

Number Overview

Icon

Behavior

VIDEO: How Number Behaves

Restrictions

Only input of numbers supported. Values with numbers and characters are not supported.

(tick) Valid: 10.5
(error) Not valid: PP10.5

Considerations

You might think number fields are best suited for GTN or EAN numbers. Picturepark NumberFilter, however, does only allow numbers in ranges, which is not suitable for GTN/EAN numbers. We recommended using text fields. 

Examples

  • The exchange rate for Currency

  • Product prices

  • Phone numbers

Number Value Handling

Picturepark Setup Example

Layer: Corporate Information (ID: CorporateInformation)

Field: Product Price (ID: productPrice, decimal) 

Fieldpath

corporateInformation.productPrice

Advanced search for the field value

corporateInformation.productPrice:84

  • The syntax finds all Content Items with the field "Product Price" available with the value "84". Wildcards 8* do not work in this case. 

Use in Display Pattern

  • Page:
    Display Pattern: Number (Solutions) — Calculate the discounted product price based on a number field for product price and another number field for discount percentage.
    {% assign discount = data.corporateInformation.discountPercentage | divided_by: 100 %}
    {% assign discountValue = data.corporateInformation.productPrice | times: discount %}
    {% assign discountPrice = data.corporateInformation.productPrice | minus: discountValue %}
    
    {% if data.data.corporateInformation.discountPercentage %}
    Discount Price: {{ discountPrice }}
    {% endif %} 

Returned field value

Returns the number as a whole number or decimal, depending on the field setting "Decimal". 

Number Field Settings

Name

No special considerations.

ID

No special considerations.

Checkbox "Decimal"

Enabled: Users can input decimal numbers.
Disabled: Users can input whole numbers.

Once set and saved, this cannot be changed!

Pattern

The input check for the number value e.g., checks for the correct phone number format. 

Use a JSON Schema regex for the pattern. See here for valid examples:

https://spacetelescope.github.io/understanding-json-schema/reference/regular_expressions.html

Min. value

The minimum value when editing this field, greater or equal the "min. value" setting. 

Example: numberFieldValue >= Minimum Value

Define a value up to a trillion (minus or plus).
Decimal values are not supported.

Max. value

The minimum value when editing this field, less or equal the "max. value" setting. 

Example: numberFieldValue <= Maximum Value

Define a value up to a trillion (minus or plus), which must be higher than the min value.
Decimal values are not supported.

Required

The Required field setting determines whether or not an editor must provide a field value before being able to save the Content Item. If a field is required and the user has not provided a value or has deleted an existing value, Picturepark does not permit saving the item. This value can be changed at any time. You cannot set a field required on a Layer with XMP mappings defined for any field. The Required field setting is unavailable for checkboxes, trigger fields, or dynamic view fields.

Sortable

The Sortable field setting defines if Picturepark uses the values of those fields for sorting List Items (in Lists). Sorting of contents based on fields in a Layer is possible via the channel configuration, which only considers fields marked as sortable. All fields except for Geo Point and Relationship fields are sortable. This can be changed after field creation. 

Sort items based on the number entered to find the smallest or largest number.

Include in filters

Enable to use the numbers in filters. It is required to define ranges for numbers, like for the Product Price define ranges like: 

  • 0 - 100: displayed as "low-price."

  • 101 - 1000: displayed as "high-price."

When working with product numbers, ranges are not sufficient, but the configuration of filters in the Content Browser does not allow number filters without ranges. We recommend using text fields for product numbers. 

Include in search

The Include in search field setting determines whether or not the field's values should be considered in content browser simple search operations. If this option is not enabled, the search does not consider the values of the field in search operations. This can be useful, for example, if the field is used for internal discussions or work directives that you don't want to affect the search results. Picturepark checks those settings against the allowed number of Search-indexed fields in your subscription plan. While it may be tempting to include all fields in filters and simple search boosting them, you may revisit this idea based on your subscription plan limit.

Boost value

The Boost factor field setting will boost the values in the search and help you define the relevance of the content for your users. The boost parameter increases the relative weight of a term (with higher boost values) or decreases the relative weight (with lower boost values), but the increase or decrease is not linear. In other words, a boost of 2 does not result in double the score. You can select between 1, 10, 25, 50, 100, or 500. 

  • Boosting in a list is for the search in fields while tagging.

  • Boosting in layers is for the content browser search.

Picturepark checks this setting against the allowed number of Search-indexed fields in your subscription plan. While it may be tempting to include all fields in filters and simple search boosting them, you may revisit this idea based on your subscription plan limit.


  • No labels