How to apply a filter in a REST Snap and hard code the value? - snaplogic

Suppose there is some data which I want to pass through the rest snap and in the query parameter I have given filter and in query parameter value I want to pass a hardcoded value. For example, "name .eq ", then what?
How can I give a hardcoded value in this filter option?

You can pass hard-coded values as it is. Refer to the following screenshot.
Just don't click on the expression button (the button with = on it) and you should be good.

Related

Trouble using concat function in Power Automate

Trying to increment a Unique ID field in my SharePoint list every time my flow runs. Ex: If the Unique ID field in the last row before the flow runs again is "M10389". Then after the flow runs, a new item will be created underneath it and its Unique ID will be "M10390".
The only piece of the flow that doesn't work is the Unique ID part. Here are the pieces of code within the Unique ID field of the create item action block that won't work, but should.
I've tried:
concat(string(M),add(10386,triggerBody()?['resourceData']?['responseId']))
and
concat(M,add(10386,triggerBody()?['resourceData']?['responseId']))
P.S. The "triggerBody()?['resourceData']?['responseId']" is the number of submissions from the form that triggers this flow, and is how I am incrumenting the Unique ID field by one.
Neither work and I think it has something to do with the concat() function, because concat(m,n) doesnt work, neither does concat(string(M),string(2)), or even concat(string(m),string(n)). In fact, the only time concat works is when I'm using 2 numbers like concat(52,7).
The error message simply reads:
"us.flow.microsoft.com says
The expression is invalid."
How do I achieve what I'm after within power automate?
Picture of what this looks like:
A bit similar to Muhammad's answer. Try using a variable, and set the value of the variable to "triggerBody()?['resourceData']?['responseId']".
Then increment by 1 or any arbitrary number and use as needed.
Well another approach to achieve the same could be two create two variables, one to increment unique id number part and second one is to compose the unique id. you can set value of uniqueIdNumbervariable using the Add function like you are already doing i.e.
add(10386,triggerBody()?['resourceData']?['responseId']))
Then you can set the value of second variable uniqueID by using another set variable action i.e.
M uniqueIdNumber
(you need to select 'uniqueIdNumber'variable from dynamic content, in set variable value action for uniqueID variable. )
Then you can use uniqueID variable in Create Item action.

how to get all values from dropdown from web application in blueprism

I want get all values of dropdown and want to store them somewhere. from follwing NASDAQ site https://www.nasdaq.com/symbol/ge/historical i want get all values of Timeframe and want to somewhere so that i can use those values one b one in loop and get the values of stock for all timeframe. Click below image screenshot
It's not that easy to get each of the values, but it's not impossible. First you can get all the values in a Data Item as text. If you spy the element, you will notice that the attribute Value contains what you want. So you will need to use a read stage and get this specific attribute's value (you can ignore the PDF elements):
Doing so will give you the following:
The problem with this is that you cannot use this in a loop. One way around would be to split on space:
And the resulting collection (I called it Split Values) will look like this:
But it's not quite there yet. You should however be able to use this collection to get the collection you need (or use it directly).
If you use it directly, I would say it should look like this:
Empty? has the expression [Split Values.words]="" (notice the last row is blank)
Value is number has the expression IsNumber([Split Values.words])
Set Current Item as Number has expression [Split Values.words] with store value Current Item.
Append word to Current Item has expression [Current Item]&" "&[Split Values.words] with store value Current Item.

Logic Apps : Use Dynamic content within the Logical functions

I am trying to add a condition in Logic apps using one of the field . I have a field named score .
I want to add a condition and insert to the SQL database column named "Result".
The score returns the values from 1 to 10. I just want to check
if the value lies between 1-5 means then "Negative" if the value lies
between 5-10 means "Positive"
This is what i have done, i have used the logical functions named "if" and wrote the condition as,
if(parameters("Score")>5,"Positive","Negative") //just an example to check
But it says "The expression is invalid" , how should i correct this?
Try the below. It works for me
if(greater(parameters('score'),5) ,'Positive','Negative')

#DbLookup To Find Column

I'm trying to use an #DbLookup in my XPage app to pull data from a column in another application. The application filename that I'm wanting to call is: aApplications\HCHPhoneBk.nsf but I'm not sure how the structure for the #DbLookup would go. It's located on a server called: DomApps01/Hendricks and the column I am wanting to get is the 2nd one.
This is what I have now, and it's not working.
#DbLookup("";"HRH Phone Directory":"aApplications\HCHPhoneBk.nsf";"People";
The syntax for #DbLookup() is:
#DbLookup([server, path], view, key, column)
So in your case it should look something like this:
#DbLookup(["DomApps01/Hendricks", "aApplications/HCHPhoneBk.nsf"], "People", key, 2)
...where "People" is the view you want to search and key is the search value for the first column. If you just want to retrieve all the values in the second column without filtering it by the first column, use #DbColumn instead of #DbLookup; the syntax is identical, except you would omit the key parameter.
P.S. Note the use of / instead of \ in the application path. \ is an "escape character" in JavaScript, so in this syntax, / is preferred.

Select all used values of a specific field as source for dialog list choices

In my Lotus Notes Database, I want to fill the choices available in a dialog list based on the previously entered values for this field.
I set type of the field to "Dialog list", chose "Use formula for choices" and selected "Allow values not in list".
However, I don't know what to enter as a formula:
The formula's result should be all values for the field Foo specified in the database.
I tried the following formula which results in an empty list, however:
#Unique(SELECT Foo)
There are definitely documents with values for Foo in the database.
Which formula can I use?
Or do you know better solutions to my problem than using a formula?
Many thanks in advance for your responses!
You need to create a view with at least a column that displays the Foo field. You can then use #DbColumn in your formula to retrieve all values from e.g. column 1 containing the Foo field:
#Unique(#DbColumn("";"":"database.nsf";"Your new view";1))
Here is more informatiom about #DbColumn: http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=%2Fcom.ibm.designer.domino.main.doc%2FH_GENERATING_CHOICES_FOR_LISTS_STEPS.html
Similar way, but error handling included.
Look := #DbColumn("":""; ""; "$LookFoo"; 1);
#If(#IsError(Look); ""; #Unique(Look))
Database parameter can be empty, if you are reading from the current. If there is a problem with cache, you can make first parameter like - #DbColumn("":"NoCache";...
Hope it helps.

Resources