Solved

Can a CF be both referenced and persistent

  • 15 January 2020
  • 5 replies
  • 550 views

Hello, 

 

We’re creating a custom page with a CF’s. 

 

With one attribute, we ideally would like to use implementation type ‘select’ from a read only field type, but also have the ability to use this as a persistent field type (so we can over type if necessary)

 

Any ideas whether this is possible, or any suggestions to workaround?

 

Thanks in advance

Rob

icon

Best answer by Corc22 15 January 2020, 14:41

View original

5 replies

Userlevel 6
Badge +13

@Corc22,

When creating a custom field, you have the ability to create persistent - reference type custom fields. Just create a persistent custom field and select the ‘reference’ as data type.

Under the reference window, you can provide logical unit information. Anyway, there is no option to write a select expression with this combination.

 


Is that what you want?

Userlevel 6
Badge +18

If I understand correctly the request is to have a Reference type field so that the user can select a value, but then also make that value/field so that it can be manually entered into with presumably a non-list value.

I don’t think this is possible since it generally defeats the purpose of a lookup field value, but I do understand why it might be wanted in some situations.

Nick

 

 

Thank you both for your time, I tried the first option, but this still doesn’t let enter a non-list item.

@NickPorter agree, but I thought I’d ask in case there was a clever workaround. 

Thanks and all the best

Rob

Userlevel 7
Badge +18

Try a Persistent field that defaults to a referenced value. You can do this by creating a “BEFORE INSERT” Oracle trigger.

 

CREATE OR REPLACE TRIGGER c_default_field_x_tib

BEFORE INSERT ON my_custom_logical_unit_clt FOR EACH ROW

DECLARE

BEGIN

   :NEW.cf$_field_x := ifsapp.some_api.some_function();

END c_default_field_x_tib;

 

Userlevel 2
Badge +7

Hi @Corc22 

I know I am too late, but If I am understanding your requirement correctly, you need a persistent field with a default value set using a ‘SELECT...’ statement, am I right?

If this is the case, you can set Default Value when you create a persistent field. Select a ‘PLSQL Expression’ and type your SELECT statement -
 

 

Thanks.

Reply