How to set default value to the parameter of stored procedure in Stimulsoft report? - stimulsoft

I use stored procedure that call table base function for get data in my report.This procedure has a parameter that when I try to get preview get me error . I want set default value for this parameter to get preview with out run app.
Is this possible?
How to do this?

You can set the default value in Expression.

Related

Prisma ORM- create stored procedure

Using Prisma client 3 I'm trying to create a stored procedure.
The motivation behind it is:
I need to query a table that will be created on run time.
To do this, I need to use dynamic queries,
and I read that stored procedures will be the better practice in this case (pass the table name as a parameter).
I would like for each member of my team to have the updated version of the stored procedure (like all the tables in Prisma)
So, what I've decided to do is to create the stored procedure with prisma.$executeRaw when the app starts and call it when I need.
The code:
let prisma = new PrismaClient();
let res = await prisma.$executeRawUnsafe(`
CREATE PROCEDURE \`module-events\`.GetAllProducts()
BEGIN
select 555;
END
`);
The result:
Invalid `prisma.$executeRaw()` invocation:
Raw query failed. Code: `1295`. Message: `This command is not supported in the prepared statement protocol yet`
As you can see the $executeRawUnsafe() returns the same results. Is there any way to create a stored procedure with Prisma? Is there a way to run a "free style" query that is not limited by Prisma?
I understood from this answer that it is possible to create the stored procedure:
You could also use $executeRaw to generate the stored procedure or use the tool/CLI of your choice.

No response from update where value is includes an ampersand

I am working on Node and using oracle-db module.
I am trying to run this block through connection.Execute(...):
BEGIN
Update emp set Firstname ='name1' where empID=('123','ui&uiu');
Update dep set Location ='Hyderabad' where depID in('132&ny&Y' , 'uiou89')
END;
Service is not returning anything and just stuck.
From searching I learned that I need to run set define OFF but when I include that line in the block it throws an error. So please guide me how can I set this.
Note: I do not want to use employee ID or department ID as parameters as I need to loop through for every parameter value.

get default value from Default Value control in Maximo autoscript

In a Maximo 7.6.0 automation script, I can get the default value from the Default Value in Database Configuration with a chain of calls like this:
mbo.getThisMboSet().getMboSetInfo().getMboValueInfo("WONUM").getDefaultValue()
If there is a textbox with inputmode="default", I can get that default value with a chain of calls like this:
mbo.getThisMboSet().getDefaultValue("WONUM")
If there is also a Default Value control in play, what is the chain of calls to get that default value? (The calls above still return the same things.)
It doesn't look like there is an easy way to get this data via some helper method like those. The setAppDefaultValue() method reads these values in and applies them to the MBO at some point during the load or init of the MBO.
According to the JavaDocs for that method (https://developer.ibm.com/static/site-id/155/maximodev/7609/maximocore/businessobjects/psdi/mbo/Mbo.html#setAppDefaultValue()), the data is stored in the appfielddefault table, if you wanted to pursue that route.
Looking through the code of that method, it fetches a few pieces of information and then uses the data dictionary to get all of that default data (via the following line).
/* 7320 */ HashMap defaultAppVal = getMboServer().getMaximoDD().getAppFieldDefaults(appStr.toUpperCase(), getMboSetInfo().getObjectName().toUpperCase(), siteStr, getUserName().toUpperCase(), groupSet);

How to display actual value of a property which is using property expansion

I require some help on being able to get around displaying an endpoint from a SOAP Request.
Below I have a piece of code which retrieves an endpoint from a SOAP Request named 'TestAvailability' and outputs it to a file (the code is within a groovy script step).
def endpoint = testRunner.testCase.getTestStepByName('TestStep').get
Now here is the catch, in the file it outputs the endpoint as so:
ENDPOINT: ${#Project#BASE_URL}this_is_the_endpoint
The reason it displays ${#Project#BASE_URL} is because this is a variable set at project level so that the user can select their relevant environment from a drop down menu and that value will be displayed for the variable: ${#Project#BASE_URL}
But I don't want the project variable to be displayed but instead its value like so if ${#Project#BASE_URL} is set to 'testenv'
ENDPOINT: testenv_this_is_the_endpoint
My question is how do I change the code in order to display the endpoint correctly when outputted to a file?
You have a trivial issue. Since it is using property expansion in the endpoint, it request to expand it.
All you need is to change below statement
From:
testResult.append "\n\nENDPOINT: " +endpoint
To:
testResult.append "\n\nENDPOINT: ${context.expand(endpoint)}"

BizTalk: Getting error in Promoted Property

I am getting below error when I run the Orchestration and try to assign value to a promoted property by reading the value of another promoted property.
Error in Suspended Orchestration:
Inner exception: There is no value associated with the property BankProcesses.Schemas.Internal_ID' in the message.
Detail:
I have 2 XSD schemas, 1 for calling a stored procedure and reading its response and another to write it into a flat file. The internal ID returned in the response from SP needs to be passed to a node in another XSD schema to write to a flat file format.
I have promoted an element from the response schema and also promoted an element from the schema to write to flat file. I am assigning the value to promoted propeties as below:
strInternalId = msgCallHeaderSP_Response(BankProcesses.Schemas.Internal_ID);
msgCallSP(BankProcesses.Schemas.Header_Internal_ID) = strInternalId;
But when I run the orchestration I get the error as mentioned above. I have checked the reponse from stored procedure and the reponse XML does contain some value but I am unable to assign that value to another schema. Please advice
Thanks,
Mayur
You can use exists to check the existence of property.
if(BankProcesses.Schemas.Internal_ID exists msgCallHeaderSP_Response)
{
strInternalId = msgCallHeaderSP_Response(BankProcesses.Schemas.Internal_ID);
msgCallSP(BankProcesses.Schemas.Header_Internal_ID) = strInternalId;
}
One scenario that might cause this error is that there is no Header_Internal_ID element in the message you are trying to modify. Can you inspect the message before modification to ensure that there is an element whose value should be changed - drop the message out to a file location, maybe.
If this is the case, then just ensure that you create this element when you instantiate you r message for the first time - even if you initially set it to an empty element.
HTH
To check if the property exists, you can use this syntax:
BMWFS.LS.BizTalk.CFS.BankProcesses.Schemas.Internal_ID exists msgCallHeaderSP_Response
However, if the case is that the source field would always be there, you have to work backwards to find out why the Property is not appearing on the Context.
If it's coming from a Port, is the message passign through an XmlDisassembler Component? If it's coming from another Orchestration, are you actually setting the Property?
The easiest way to look at the Context is to route the Message, msgCallHeaderSP_Response, to a Stopped Send Port. You can then view the Context in BizTalk Administrator.

Resources