Solved

PL/SQL get value from text field

  • 20 December 2021
  • 5 replies
  • 685 views

Userlevel 7
Badge +22
  • Superhero (Customer)
  • 943 replies

Hi,

how can I get a value from a text field (for example a part no, project id etc.) into a variable in PL/SQL (something like Apex)? Is that possible?

For example:

select * from table where column = :text_field;

 

thank you

icon

Best answer by Charith Epitawatta 20 December 2021, 14:55

View original

This topic has been closed for comments

5 replies

Userlevel 7
Badge +31

Hi @Link,

Could you please let us know the use case? For an example, to create a custom field, event action etc. A little bit more details about what you are trying to do would help.

Thanks!

Userlevel 7
Badge +22

Hi @Link,

Could you please let us know the use case? For an example, to create a custom field, event action etc. A little bit more details about what you are trying to do would help.

Thanks!


Hi Charith,

yes, I want to create an custom event. With this event I want to prevent enter more than 35 characters in a text field. If a user want to enter more than 35 characters in a text field then the event should shows an error message while saving the object.

 

Thank you and kind regards

Userlevel 7
Badge +31

Hi @Link,

When creating a custom event, you can select which attributes you need to be available for your event action.

Once you have selected the necessary attributes above and saved, they will appear in the available substitution fields section when you create an action for that event. You can use them in your event action as variables in your SQL block. 

 

You can find the Custom Events documentation here:

https://docs.ifs.com/techdocs/foundation1/040_administration/240_integration/320_events/default.htm#Custom_Defined_Events

 

Hope this helps!

Userlevel 7
Badge +22

Hi @Link,

When creating a custom event, you can select which attributes you need to be available for your event action.

Once you have selected the necessary attributes above and saved, they will appear in the available substitution fields section when you create an action for that event. You can use them in your event action as variables in your SQL block. 

Hope this helps!


Hi Charith,

thanks for replying.

Of course I know these attributes. Bute these are already in the database.

I need a value from a certain text field to check the lenght. Short: do plausibility check before saving.

 

Kind regards

Userlevel 7
Badge +22

Hi @Link,

When creating a custom event, you can select which attributes you need to be available for your event action.

Once you have selected the necessary attributes above and saved, they will appear in the available substitution fields section when you create an action for that event. You can use them in your event action as variables in your SQL block. 

Hope this helps!


Hi Charith,

thanks for replying.

Of course I know these attributes. Bute these are already in the database.

I need a value from a certain text field to check the lenght. Short: do plausibility check before saving.

 

Kind regards


Hi Charith,

you are right. :-)

 

 If  LENGTH('&NEW:DATA8') > '35' Then
     Error_SYS.Record_General('Attention', ' Bankaddress Line 2 can only consists of 35 characters');
     
     rollback;
 End If;

 

Thank you