ServiceNow "Display Value" - servicenow

I am not able to understand the meaning of "Display Value" in Service Now.
I found some of the documents on the web. But that was not helpful.

Think of it as choosing what field to use as the "Name" of the record. It's what shows up in reference fields, when you call the GlideRecord.getDisplayValue() function, and other places in the system.
Let's say for simplicity you have a table called "Problem" with 3 fields:
Number
Creation date
Created by
You're on the "Incident" table, and you want to link the incident to a certain problem. You open up the reference picker and choose the problem from the popup list, but when you return to the incident form the value showing in the field "Problem" says "2017-05-08 10:30:50". This indicates that the "Display Value" field is set to "Creation date". The incident is linked to the correct problem, but it's just the "Display Value" is not set correctly.
If you updated the "Problem" table so that it's "Display Value" field was "Number", then when you chose the problem to link your incident to, the "Problem" field on the incident record would show up for example like "PRB000005".
There can only be one display value per table. If you change a field to be the display value for that table, any other field on that table with display value = true will be set to display value = false.

Related

Conditional field rendering in oracle apex forms

I have a table 'arrear students'. And i want to create a form on it but the input fields must only appear on the form upon certain conditions like if the previosuly stored value in the field was null it must appear or else it shouldn't.
Create a form on your table
Each column will be a page item
To set a display condition for a page item, go to "Server Side Condition" and pick the appropriate condition for your requirement (eg if value NULL - pick "Item = NULL")

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 |

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".

Orbeon: dynamically add item to select object

I would like to add the items to select object based on value of another fields. For example, if my related field have value "1", i would like to have only one item into select object.
Thanks!
I solved this problem using orbeon "Database service", i'll try to explain it step by step.
1° i have added a "database services" that create temporary table into database (in my case database server is oracle) with this sql code:
with t as
(
select (i.column_value).getnumberval() Codes from xmltable('1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20') i
)
SELECT Codes as id, CONCAT(Codes, '° select') as value FROM t
WHERE Codes < (<sql:param type="xs:string" select="''"/> +1)
This query creates a list of items with "id" and "value". To see the output of the query run it into one oracle client.
2° i have added an "Actions" where i set into the field "Service to call" my database service, into the field "Set Database service parameter" my input field that contain number used by my query and into the field "Destination selection control" the destination dropdown menu.
For more details on how to configure dropdown menu follow this link http://discuss.orbeon.com/Prepopulating-the-dropdown-with-database-service-is-not-working-td4656948.html where there is the screen shot.

How in ORACLE CRMOD will a field becomes read only when the pick-list is set to some value

In Oracle CRM ON DEMAND we have the “Status” dropdown field with value as “Completed” in Activities. I have Configure it in a such a way so that the Subject field becomes read only when the status is set to Completed.How to do that.
I found the answer its by using Field Validation by writing Expression.To make Subject Field Read-Only when Status is set to Completed, follow these steps:
GOTO.Admin>Application Customisation>Activity>Activity Field Set UP.
Click Subject and in Field Validation box,
write the following expression
PRE('') = [] OR NOT []=LookupValue("EVENT_STATUS", "Completed")
save it to see required result

Resources