I'm attempting to use a Banner API Call.
per the documentation the create call looks like this.
PROCEDURE p_create(
p_pidm gorimmu.gorimmu_pidm%TYPE,
p_immu_code gorimmu.gorimmu_immu_code%TYPE,
p_seq_no gorimmu.gorimmu_seq_no%TYPE,
p_user_id gorimmu.gorimmu_user_id%TYPE DEFAULT gb_common.f_sct_user,
p_immu_date gorimmu.gorimmu_immu_date%TYPE DEFAULT NULL,
p_imst_code gorimmu.gorimmu_imst_code%TYPE DEFAULT NULL,
p_comment gorimmu.gorimmu_comment%TYPE DEFAULT NULL,
p_data_origin gorimmu.gorimmu_data_origin%TYPE DEFAULT NULL,
p_seq_no_out OUT gorimmu.gorimmu_seq_no%TYPE,
p_rowid_out OUT gb_common.internal_record_id_type);
I'm not sure how to use the last two fields that have OUT.
I've used other API calls..but none of them used an OUT.
any help is appreciated..banner documentation not helpful
That just means you must provide a parameter for the API call to populate. So define two variables to pass in such as:
l_seq_no_out gorimmu.gorimmu_seq_no%TYPE;
l_rowid_out gb_common.internal_record_id_type;
Then just pass those as the last two parameters to the p_create call.
Related
i want to set default value in many2many field for example:
that field in models.py:
# alarms
alarm_ids = fields.Many2many(
'calendar.alarm', 'calendar_alarm_calendar_event_rel',
string='Reminders', ondelete="restrict",
help="Notifications sent to all attendees to remind of the meeting.")
also it is default values created by system, and i want first variant by default:
i know that i can set it by id, but dont know how.
You can use Command to set X2many field values.
From the documentation:
Via Python, we encourage developers craft new commands via the various functions of this namespace. We also encourage developers to use the command identifier constant names when comparing the 1st element of existing commands.
Example:
from odoo import Command, models, fields
class CalendarEvent(models.Model):
_inherit = 'calendar.event'
alarm_ids = fields.Many2many(default=lambda self: [Command.link(self.env.ref('calendar.alarm_notif_1').id)])
i just watch in postgres, there is no id`s like in xml screenshots, i just take id of a record and find some documentation.
next example works:
Please forgive me if my question does not make sense.
What im trying to do is to inject in values for query parameters
GET1 File
Scenario:
Given path 'search'
And param filter[id] = id (default value or variable from another feature file)
POST1 File
Scenario:
def newid = new id made by a post call
def checkid = read call(GET1) {id : newid}
like if one of my feature files creates a new id then i want to do a get call with the above scenario. therefore i need a parameter there which takes in the new id.
On the other hand if i do not have an id newly created or the test creating it is not part of the suite. i want to still be able to run the above mentioned scenario but this time it has a default value to it.
Instead of param use params. It is designed so that any keys with null values are ignored.
After the null is set on the first line below, you can make a call to another feature, and overwrite the value of criteria. If it still is null, no params will be set.
* def criteria = null
Given path 'search'
And params { filter: '#(criteria)' }
There are multiple other ways to do this, also refer to this set of examples for data-driven search params: dynamic-params.feature
The doc on conditional logic may also give you some ideas.
I'm wondering how you change user passwords in oracle apex. Currently I'm trying to use this pl/sql code in a process when the user exists and the reset password field is filled in.
if APEX_UTIL.GET_USERNAME(p_userid => :P5_ID) IS NOT NULL AND :P5_WACHTWOORD IS NOT NULL
then
apex_util.edit_user(
p_user_id => &P5_ID.,
p_new_password => '&P5_WACHTWOORD.'
);
end if;
But apex keeps giving me this error: PLS-00306: wrong number or types of arguments in call to 'EDIT_USER'.
I tried adding the old password in the p_web_password param incase apex needed this. I still got the same error.
Just incase I'm doing it completely wrong. I just started using apex and I'm trying to use the default authentication, but I also want to store more stuff about the same user in my own database.
I decided to use the userid my database generates as the apex userid so I can keep track which user is logged in. Is this the right way or are there better options out there?
A cursory glance at the documentation for the API shows the p_user_name is also a mandatory input.
APEX_UTIL.EDIT_USER (
p_user_id IN NUMBER,
p_user_name IN VARCHAR2,
p_first_name IN VARCHAR2 DEFAULT NULL,
p_last_name IN VARCHAR2 DEFAULT NULL,
p_web_password IN VARCHAR2 DEFAULT NULL,
...
http://docs.oracle.com/database/apex-5.1/AEAPI/EDIT_USER-Procedure.htm#AEAPI117
Is there any reason you aren't using bind variables for the actual parameter values?
p_user_id => :P5_ID
Where can I find a database of European countries and related cities to implement country/city dropdown list (dynamic) in the web-page?
UPDATE: I´m interested in some database that I can utilize from the javascript or php source code. This is to avoid manual work.
My answer: I have found one more good free resource: http://www.geodatasource.com/world-cities-database
MaxMind World Cities is a free list that you can download and use in your app (assuming that the license is ok for your purposes). Otherwise they've also got a webservice (though you have to pay for that).
An alternative is GeoNames.
http://en.wikipedia.org/wiki/Europe#Political_geography
Wikipedia always works :)
For some reason I thought about capitals only, but I guess you mean all cities.
Take a look at:
http://download.geonames.org/export/dump/
Check out the readme.txt which has more info.
Perhaps cities1000.zip could be used as a base for you. Maybe you need to create a database with the countries you want, and then perhaps filter the list from the link above by ISO-code or something.
The readme also mentions some continent code, so maybe that can be of use?
http://www.webservicex.net/country.asmx/GetCountries list of countries in xml
http://www.timdavis.com.au/data/
Get an excel for list of country and state.
You need use Jquery for dynamic ajax dropdown list. See here php/ajax script -
http://myip.ms/info/cities_sql_database/
Cities table format will be -
CREATE TABLE `cities` (
`cityID` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`cityName` varchar(50) NOT NULL,
`stateID` smallint(5) unsigned NOT NULL DEFAULT '0',
`countryID` varchar(3) NOT NULL DEFAULT '',
`language` varchar(10) NOT NULL DEFAULT '',
`latitude` double NOT NULL DEFAULT '0',
`longitude` double NOT NULL DEFAULT '0',
PRIMARY KEY (`cityID`),
UNIQUE KEY `unq` (`countryID`,`stateID`,`cityID`),
KEY `cityName` (`cityName`),
KEY `stateID` (`stateID`),
KEY `countryID` (`countryID`),
KEY `latitude` (`latitude`),
KEY `longitude` (`longitude`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
I'm converting some RDO code to ODBC Provider code in .NET.
The problem is parameter names were not specified in the orignal code, but param values were retrieved by parameter name after the command was executed.
Is there anyway to have parameter names populated by the provider once the command is executed so calling code can access params by name.
Let me show you an example of the declaration of param and accessing of it.
With rdqryClntBasic
.Parameters.Add(.CreateParameter) : .Parameters(0).Direction = ParameterDirection.Input
.Parameters(0).DbType = DbType.String
.Parameters(0).Value = sClntProdCd
End With
.EffectiveDate = ToDate(rdqryClntBasic.Parameters("dtEffDt").Value)
You can now see how this "used to work in RDO/VB". For some reason it would accept this and know what the param names were after execution. I imagine it had to do another round trip to the db to get this info.
Is there anyway to mimic this behaviour in .NET for ODBC Provider (using Oracle)? Or am I stuck manually specifying the param names in the code (I understand this is the better option, but wondering what the alternative is to match the original code as closely as possible).
No, parameters in ODBC are positional not by name.