Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Auto increment the IG column value on add row button click.

ApexLearnJun 30 2022 — edited Jun 30 2022

Hi,

am using oracle apex 19.2 version.
How to increment the Interactive grid column value when add row button click.
image.pngAs shown in the above screenshot, need to get the sequence automatically when click on Addrow button.
I tried with the below link but the value is increment for click on the grid but should work on addrow button click only.
Auto increment number on click add row button in interactive grid Oracle APEX - Ontoor Blogs (ontoorsolutions.com)

Kindly advice to get the auto increment value in IG column.

Thanks in advance.

This post has been answered by Hamza Al-abbasi on Jun 30 2022
Jump to Answer

Comments

807557
It depends on which shell the script is using.: sh, ksh, bash...
You should find plenty of examples in /etc/init.d
807557
Hi,
Actually i want to set the variable in crontab and use the same variable in the script that is located else where. I have to run 5-6 scripts which uses this variable. So i want to define it in the Crontab file and use the same in the shell script.
Eg : I edited the crontab file of root as follows
NEW_HOME=/export/home/general
DB_SETUP=user/user@user
59 17 * * * /export/home/general/executeScript1.sh


executeScript1.sh is located in /export/home/general, which is as follows :
#!/bin/bash
echo "$NEW_HOME"
if [ -r "$NEW_HOME"/cron.log ]; then
echo "file is listed in the Directory"
else
echo " file is not listed"
exit 2
fi

when i execute the script under /export/home/general it works fine : it echos "file is listed in the Directory" since NEW_HOME is set in the env.
But when i excute the same in cron it doesnt. the var that is echo "$NEW_HOME" is blank. So how do i set the variable so that it can be picked when the script is being execute from cron

thanks
user4994457
Hi,
Actually i want to set the variable in crontab and
use the same variable in the script that is located
else where. I have to run 5-6 scripts which uses this
variable. So i want to define it in the Crontab file
and use the same in the shell script.
The crontab format doesn't allow that.
Eg : I edited the crontab file of root as follows
NEW_HOME=/export/home/general
DB_SETUP=user/user@user
59 17 * * * /export/home/general/executeScript1.sh
I would assume you got an error about invalid lines in the crontab.
when i execute the script under /export/home/general
it works fine : it echos "file is listed in the
Directory" since NEW_HOME is set in the env.
But when i excute the same in cron it doesnt. the var
that is echo "$NEW_HOME" is blank. So how do i set
the variable so that it can be picked when the script
is being execute from cron
Set the environment prior to each line. You mention 5-6 scripts. That's not too many to just cut&paste the environment in your favorite editor.

59 17 * * * NEW_HOME=/export/home/general DB_SETUP=user/user@user /export/home/general/executeScript1.sh

--
Darren
807557
Thanks Darren, that works. Can you plz help me on one more issue.
In the scripts i was mentioning, i am actaully picking a few .xls files converting them into .txt files husning JXCEL. After the successfull conversion we call a java program which connects to the DB ( thats what theDB_SETUP variable is for) which executes a set of procedures fro storing the content from the .txt file into the DB. On successfull execution of the procedure i call a mailer program which send mail to the respective uses. All the above process i automate it using Cron. As i already mentioned the above set up works fine in linux where we set the vaibales intially in itself unlike in solaris where you mentioned its has to be set along with the scheduled script. Now For the above process of calling java program, connecting to DB, then excuting a mail i need to set a few jars in the class path as follows :
CLASSPATH=/DataConversion/DataConversionMail/ogi_ims/lib/activation.jar:/DataConversion/DataConversionMail/ogi_ims/lib/classes12.jar:/DataConversion/DataConversionMail/ogi_ims/lib/log4j-1.2.8.jar:/DataConversion/DataConversionMail/ogi_ims/lib/mail.jar:/DataConversion/DataConversionMail:.
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/j2sdk_nb/j2sdk1.4.2/bin:$ORACLE_HOME/bin

The above 2 lines i set in the beginning in the crontab file in Linux. But I dont think i can do the same in Solaris crontab file. But my java programs embedded within the shell script will be pointing to these jars, so how i do put these jars in class path of the cron env when the script executes from the crontab file.
Please let me know if you need any other info.

Thanks in advance
rgds
Vijay Kumar Yenne
1 - 4

Post Details

Added on Jun 30 2022
6 comments
3,863 views