## Is there a unique measure for a local field?

Suppose we look at a local field and for a moment forget the topology and consider the set of all key figures for some non-trivial ones $$sigma$$-Algebra over the field, which makes the field operations measurable. Has the type of this set been examined?

## 8 – Conditional display field based on the comparison with another field

I have an event content type with a start date (field_eventdate) and an optional end date (field_eventend).
Although it is optional, users often fill in the end date with the same date as the start date.
So I want to hide the end date if it matches the start date, or show it on the same line as the start date if it's different.

e.g.

``````2020-02-02 10:00
Here comes more text for a single day event
``````

and

``````2020-02-02 10:00 - 2020-02-03 16:00
Here is more text for a multiday event
``````

So far, I've been able to delete the end date from the render array if it's the same:

``````function mytheme_preprocess_node__event(&\$variables) {
\$startdate = \$variables('content')('field_eventdate')(0)('#markup');
\$enddate = \$variables('content')('field_eventend')(0)('#markup');

if (\$startdate === \$enddate) {
unset(\$variables('content')('field_eventend'));
}
else {
// add an &em-dash; so the dates are nicely spaced
\$variables('content')('field_eventend')(0)('#markup') = " — " . \$enddate;
// add float-left to the start date so they end up on the same line
// TODO: what goes here?
}
}

``````

However, I can't figure out how to tell in a branch template that I have a start and an end date, so I add CSS classes with the "float" addition to line them up.

I tried to use the & # 39; field_eventdate & # 39; add a special attribute and add a class with a left-turning cursor to the branch template for the field, but the custom attribute is lost somewhere.

How can I solve this problem?

## 8 – Default value for the date / time field definition in the content entity?

You must pass a callback function that will be evaluated when the entity is saved. When you evaluate the time value in `YourEntity::baseFieldDefinitions`the default value is set every time the entity type is installed.

`DrupalDateTime::createFromTimestamp` cannot be used as a callback because you are expected to pass a timestamp. The default callback must take two arguments: the entity to be saved and the field definition itself:

• `DrupalCoreEntityFieldableEntityInterface \$entity`
• `DrupalCoreFieldFieldDefinitionInterface \$definition`

So you need to create a callback function, e.g.

``````use DrupaldatetimePluginFieldFieldTypeDateTimeItem;

// ...

function mymodule_get_current_datetime(\$entity, \$definition) {
\$current_time = DrupalDateTime::createFromTimestamp(time());
return \$current_time->format(DateTimeItem::DATETIME_STORAGE_FORMAT);
}

``````

And then pass this callback as a string.

``````\$fields('start_date') = BaseFieldDefinition::create('datetime')
->setLabel(t('Start date'))
->setDescription(t('Start date in GMT time.'))
->setDefaultValueCallback('mymodule_get_current_datetime')
->setDisplayOptions('view', (
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', (
'type' => 'datetime_default',
'weight' => -3,
'default_value' => DrupalDateTime::createFromTimestamp(time()),
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
``````

## Unit – recoil to zone on non-rectangular field

I have a playing field that is divided into 4 zones (see picture below)

The player (blue) is in the second zone, while 2 enemies (red) are in the third zone. If the player throws an object and hits the enemy, the enemy will be knocked back in the next zone (4), but their translation should remain in the zone that corresponds to the direction of the hit.

Question: How do I find X?

Note that it can be on any form of playing field (triangular, hexagonal, circular, …)

## ux field – How can I get the user to choose between two options (Available or Not available) under IOS?

If I want the user to choose one of the two options (available or not available) … what's best for this design in the iOS application? I tried to use fragment buttons. Is that true?

How can I make the user choose between two available or unavailable options for each item in the list?

## sharepoint online – How to update the existing field value in a new field as soon as the existing field value is changed

I have a sharepoint list. In this list I have the following fields.

1- Employee name
2- department
3- Current project name
4- Date of the current project
5- Current project end date
6- Previous project name
7- Date assigned to previous project
8- previous project end date.

Senario: If an employee "A" is assigned to "Project1" from 1-1-2019 to 2-2-2019
As a result, my field is updated with the details above such as "Employee Name, Current Project Name, Assignment Date, and Current Project End Date" Now after the end date "2-2-2019", employee "A" will be assigned to project "B" from 2-3-2019 to 3-3-2019. Therefore, my existing field data is also changed to new data, such as "current project name, project assignment date and end date". However, if this changes, my old entry, which shouldn't be removed, will be removed. It should be updated under "Previous Project" name
, Date assigned to previous project

## 8 – Use a custom field as a subfield in another custom field

Some time ago I successfully implemented a custom field (this was an extension of the DateRange field type to improve the control of the presentation, etc.).

I have a couple of other use cases where I could use a modified Daterange field as a subfield in another custom field type. Now I know that I could implement it the same way in any new custom field type, much easier if I could just insert my custom Daterange field. If this is not possible, is it best to set my custom data type as the base type and extend it for each field type to be created? Or is there another solution (I don't want to use paragraphs because I don't get the level of adjustment I want)

## sharepoint online – field value update in the next field

I am not sure if there is a solution to the requirement below. Please help if there is one.

I have two fields in the Sharepoint list.