Can't set offset for custom time field in drupal9 views - view

In the views, I want to use the custom time field 'end_time' as the search condition: end_time is greater than or equal to the current time; but I found that there is no offset selection in the configuration item, only a value input box; but the system comes with a field 'Authored on' can configure the offset. Am I missing some views configuration?

Related

Kentico 12: change value of one page type field based on value of another field

I have a custom page type with two fields, StateName and StateCode. I would like it so that when a value is selected in either of these fields, the other field’s value changes to match.
So for example, if I select “Alabama” in the StateName field, the value of the StateCode field would automatically change to “AL.” Or if I select “CO” in the StateCode field, the StateName field would automatically change to “Colorado,” etc. Is this possible?
(I have to keep these as two separate fields, because I need to display either the state name or the state code on the front-end depending on context. Therefore, I can’t use a single field with options like AL;Alabama because then the field only returns the value AL and I have no way of getting the display name Alabama).
I know Kentico has options for setting “dependent” fields, but that only appears to determine visibility – e.g. only display Field B if I select a particular value in Field A. I can’t find a way to actually change the selected value in one field based on the selected value in another field.
Two control solution seems some kind of an overkill here. You can use StateInfoProvider to get what you want.
StateInfo state = StateInfoProvider.GetStateInfo("Alabama")
The other way would be to use a simple drop down control and use
query like that :
select stateCode + '|'+ StateDisplayName, StateDisplayName from cms_State
to get get code and display name as value separated by |

Crestron SIMPL Text Entry Field Initializing

I am trying to program the system where you choose day of week and in a text field next to it you should be able to chose the time of the day in increment of 15 min + or -. Which of joins should I use for txt field and how to put default time in the field?
You would just need to use an initialised value for the default time and have it incremented +/- as needed. Text entry join numbers can be the same as text feedback joins but it's better to use different ones.

Can i make a field editable for a specefic role "System Administrator" if the field type is calculated in the form

I am using a calculated field in a form (Data Type = Single Line of Text), however I would like to make this field editable for a specific users having "System Administrator" roles.
I tried using the field security profile to make this field editable (so that System Admin can update or create records here) however update/create options are disabled here in security profile and cannot be altered.
Is there an appropriate way to achieve this? Can we make a calculated field editable for specific set of roles?
No, you cannot directly edit the value of a calculated field.
A work-around would be to create a separate field, where only specific users can enter data. In your calculated field you could then add a condition to take either the manually entered value from the other field (if it exists) and otherwise use the original action for the calculated field.
The calculated field is calculated in SQL when you retrieve it, but is not stored in field.
So, for a calculated field there IS NOT a place to store a value. This makes it impossible to have the same field be calculated in some cases and manual in other cases.
You would need to have two fields the calculated fields and an override field. In the calculated field you set a condition that if the override field contains data the action is to set the calculated field equal to the override field. The else has an action to calculate the field as your normally.
Here is an example where I created a field testca(`new_testca') that will if the Account Number is populated use that value and if not its value will be some text I entered, "NEED ACCOUNT NUMBER".

how to change default settings for the new user (Vtiger CRM)?

When creating new user in Vtiger CRM lot of predefined settings (time zone, currency, etc.) are wrong form specific company setup. But I was unable to find info how to change in settings, nor with script, without getting too deep into file structure.
Is it possible (and how)?
To change the default value during entity creation, you need to change the order of values by setting the first value you want.
In vTiger each picklist has the values store in a table for example vtiger_time_zone for time_zone.
If, for example, you want to set the time zone to "Europe/Amsterdam" you need to find the corresponding value of the key field time_zoneid through query
SELECT * FROM vtiger_time_zone where time_zone = "Europe/Amsterdam"
In my case the corresponding time_zoneid returned by the query is 44.
At this point, it is necessary to change the sort order of the new desidered default value by excuting the query
UPDATE `vtiger_time_zone` SET sortorderid` = '0' WHERE `vtiger_time_zone`.`time_zoneid` = 44;
Finally, it is necessary that to move to the second position the option with time_zone = "Pacific/Midway" (time_zoneid = 1) by executing query
UPDATE `vtiger_time_zone` SET sortorderid` = '1' WHERE `vtiger_time_zone`.`time_zoneid` = 1;
Thew default currency value, instead, is given by the default value stored in $currency_name in config.inc.php and setted during the installation.
Yes you can change the Time Zone, Currency details from CRM GUI only without going into code. Just follow this simple steps.
Login to CRM with any user. After login you will see User Name or Image (If profile picture set) on top right corner. There you will get a link for "My Preference". Click on that link which will allow to change User wise Setting. This setting will be User wise so it will not take effect for other Users.
Cheers!!!!

Orbeon form builder - limit repeating element based on field value

I am using Orbeon Form Builder and have a form with a repeat section. The no. of repeats has been set to 3 however I want to vary this depending on the value set in another field. Do you know if this is possible?
The field and repeating element are in different sections on the form.
Thanks
Paul
I created a working example. The idea:
place an event handler reacting to a change of value of the count field
depending on whether the value is larger or smaller than the current number of iterations, remove or insert new iterations
this relies on the xxf:bind() function, and on knowledge of the grid repeat template
This said, as is I don't think it's a good user interface, as it can delete data upon tabbing out of the count field.

Resources