Print Thread
Beautifier - Use Special Case suggestion
#63825 04/14/22 08:06 PM
Joined: Sep 2004
Posts: 495
Dartmouth College, Hanover, NH...
Member
OP Offline
Member
Joined: Sep 2004
Posts: 495
Dartmouth College, Hanover, NH...
I work in Oracle Application Express (aka Apex) a lot and I regularly copy anonymous blocks from there into PSD for editing (then paste them back).

Apex's "variables" (aka Page Items and Application Items) need to be referenced in the format:

:UPPERCASE_VARIABLE_NAME

like:

Code
get_fund_info(sol_id_in => :APP_ID_NUMBER,
              fund_id_out => :F_FUND_ID,
              fund_name_out => :F_FUND_NAME,
              very_short_name_out => :F_FUND_SHORT_NAME,
              fund_notification_out => :F_FUND_NOTIFICATION);

In the Beautifier Use Special Case documentation, it says you can reference an item with a wildcard, like DBA_% to uppercase everything that starts with "DBA_".

I'd like to do the same with an "word" that's immediately preceded by a colon.

But that doesn't seem to work, but instead sets the Apex variable to lowercase. I don't know if it's a limit on how short the "word" can be or it's ignoring the colon or what.

Is there a particular syntax I could use for this? Maybe a regex? If not, could you please add this wish to your list?

Thanks,

Stew


Stew

"That's not a bug, it's a feature?"
Re: Beautifier - Use Special Case suggestion
Stew Stryker #63830 04/15/22 08:43 AM
Joined: Aug 1999
Posts: 22,212
Member
Offline
Member
Joined: Aug 1999
Posts: 22,212
I have added this to the list of enhancement requests.


Marco Kalter
Allround Automations
Re: Beautifier - Use Special Case suggestion
Stew Stryker #63833 04/15/22 09:12 AM
Joined: Mar 2007
Posts: 110
Hazerswoude-Dorp, NL
Member
Offline
Member
Joined: Mar 2007
Posts: 110
Hazerswoude-Dorp, NL
Hi Stew,

Are you sure the bind variables in APEX are case sensitive? as far as I can see they are not.
When using bind variable syntax, remember the following rules:
Bind variable names must correspond to an item name.
Bind variable names are not case-sensitive.
Bind variable names cannot be longer than 30 characters (that is, they must be a valid Oracle identifier).


Certainty of death, small chance of succes,
What are we waiting for... (Gimly)
Re: Beautifier - Use Special Case suggestion
koja #63862 04/20/22 06:12 PM
Joined: Sep 2004
Posts: 495
Dartmouth College, Hanover, NH...
Member
OP Offline
Member
Joined: Sep 2004
Posts: 495
Dartmouth College, Hanover, NH...
@koja

Thanks for the thought. I just tested referencing a page item using lowercase name and the returned value is null.

That's what I'd always known as the rule. It would have been frustrating if I'd been careful to do that all these years and it hadn't been true! ;-)


Stew

"That's not a bug, it's a feature?"
Re: Beautifier - Use Special Case suggestion
Stew Stryker #64123 08/11/22 04:00 PM
Joined: Sep 2004
Posts: 495
Dartmouth College, Hanover, NH...
Member
OP Offline
Member
Joined: Sep 2004
Posts: 495
Dartmouth College, Hanover, NH...
I stand corrected (and greatly embarrassed). I don't know what my original test was, but it was clearly flawed.

I re-tested and found that @koja and the documentation are correct. The bind variables are case-insensitive and I've been doing extra work for decades!

It doesn't explain my bad test, but I suspect I made up this "rule" in my head because the Apex documentation always shows UPPERCASE bind variables.

@Marco - Please remove my request from the enhancement requests list.


Stew

"That's not a bug, it's a feature?"

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.115s Queries: 15 (0.029s) Memory: 2.5158 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-05-08 12:39:15 UTC
Valid HTML 5 and Valid CSS