Conditional field rendering in oracle apex forms - oracle

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

Related

Want to know how to populate data from One block to another?

I have two database Datablock
In the First Block I have a Item called parameter name with LOV. While selecting that LOV ,it should populate Next Item Also that is Section
Now What i want is when I am selecting the Parameter name LOV from First Data Block. I want to populate the corresponding data in the list Value of the Second Data Block
For this i used post text item -->Inside that I used go block But it throws illegal restriction Error
Now I am out of ideas
If I understood you correctly, you're talking about cascading LoVs. If that's so, then the 1st LoV query looks like this:
select parameter_name, section
from some_table
where some_condition;
You set it to populate appropriate fields in the 1st data block (one of them is :block_1.parameter_name).
The second block's LoV would then "reference" the first block's field:
select another_column
from another_table
where parameter_name = :block_1.parameter_name --> this
and other_conditions;
You don't need any triggers; once you display 2nd block field's list of values, it'll use that where clause and display only values that match the condition.

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 |

Populate Text Fields from a selected table Apex

I want to populate text fields from a table selected first from a LOV and user input.
How can I do it in apex? How can I manipulate that with processing ?
For small amount of values, I prefer Select List item as it looks nice; if there are many values, it can't handle it so I use a Popup LOV instead.
In order to populate certain fields with values, you can use a dynamic action whose action is Set value (and there you can choose how to do it; for example, using some PL/SQL code).

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

ServiceNow "Display Value"

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.

Resources