Paramater concat inline - azure-logic-apps

In my Logic App, i have 2 parameters username and tenant. I need to concat these 2 with an '#' in the middle. I tried to concat it using below tries and none worked.
#{concat([parameters('username')],'#',[parameters('tenant')])}
#{concat([parameters('username')],''#'',[parameters('tenant')])}
#{concat(parameters('username'),'#',parameters('tenant'))}
Finally i had to create 3 seperate variables to hold each value and concat it and that worked.
#{concat(variables('username'),variables('at'),variables('tenant'))}
Is there any better way to do this?
Here is the app
Here is the parameters for app, username and password is fetched from params file
Here is the error when run

Related

How to apply multiple filters to a query in url for gmail api

I am using HTTP requests via an Oracle database to extract data from Gmail APIs.
In Oracle, you apply all filters to either the URL of the request or its body.
This is working fine for simple requests such as the URL below to request list of unread messages in inbox for user:
https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=500&q=is:unread&labelIds=INBOX
If I try to add more than one filter to the URL (or LabelIds) like in the URL below, I get an error response from the request:
https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=500&q=is:unread newer_than:2d&labelIds=INBOX
I have tried multiple iterations for "q=" part like using double quotes, but anything I try outside of 1 filter returns an error response.
The documentation at https://developers.google.com/gmail/api/guides/filtering give this filtering example, but that clearly doesn't work for me:
https://www.googleapis.com/gmail/v1/users/me/messages?q=in:sent after:2014/01/01 before:2014/02/01
I tried removing the "is:unread" filter and adding it as a label, but I get a similar issue when trying to use multiple labelIds in the URL request. Using just labelIds=INBOX works fine, but using labelIds=INBOX,UNREAD or various iterations of that with quotes and square brackets all return error responses.
How do I use multiple filters (and/or multiple labelIds) in the URL of a request?
Thanks,
Dick
It looks like the problem is with the space between each filter in the q section.
If I add %20 for the space, it works.
For example, "https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=500&q=is:unread newer_than:2d&labelIds=INBOX" will not work, but "https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=500&q=is:unread%20newer_than:2d&labelIds=INBOX" will work.

How to pass data to csv file from multiple json file in Logic app without appending data one by one?

Aim: Transfer JSON data of multiple file from Storage container(One folder) into one CSV file in logic app with headers.
I have design the Logic app where this above functionality working fine. Json data from all three files in folder is able to pass to one CSV file .
I have used APPEND TO ARRAY VARIABLE connector and iterate the loop through no of file and content of file.
You can get the three json first and then use union() method to merge the three json arrays.
You can use JS inline code or even offloading to an Azure Function to achieve your requirements.
Steps to Add Inline Code
Step-1 Create your Logic App from Azure Portal
Step-2 Select where to add the Inline code action in your workflow, you can add as a new step either at the end or in-between steps.
Step-3 Choose inline code and select the action Execute JavaScript Code. It contains some sample code, including a return statement.
Step-4 Clear the code and enter the your code without method signature
Step-5 To make the results from the trigger and previous actions easier to reference, the dynamic content list appears when your cursor is inside the Code box. After you select the Body token, the inline code action resolves the token to a workflowContext object that references the email's Body property value:
For this example, the list shows available results from the trigger, including the Body token, which you can now select.
Step-6 The Inline Code action doesn't require a return statement, but the results from a return statement are available for reference in later actions through the Result token.
For example, the code snippet returns the result by calling the match() function, which finds matches in the email body against the regular expression. The Compose action uses the Result token to reference the results from the inline code action and creates a single result.
Step-7 When you're done, save your logic app.
Note : You need to create an integration account and connect with your Logic App from workflow settings blade in case you want to use this feature.
For adding Triggers, Actions or Parameters you can refer HERE
You can find more information in the SO Thread which discusses on similar related issue.

How to stop $location.url from auto decoding query

I am using following query "/search/queryText=at%26t/results" to redirect to a page.
The location url auto decodes it to "/search/queryText=at&t/results". I need the value to be pristine, so that I can make use of $location.search to create an object of parameters.
The $location.search treats & as delimiter and creates two parameters (queryText=at and t=true)rather than one for the above example. Is there a way to handle this?

Angular create two cookies with same name and diff path

Im using cookie in two difference controllers ,but it is doesnt rewrite value and create a new one,so i have two cookies with same name and difference path.How can i make to rewrite it?

Is there a clean way of users managing their own locations?

A lot of my site is dynamically generated dependant on the user location.
To get an initial fix I am currently using the Smart_IP module which does this based on the user IP address - which works great as a starting point. I can access $_SESSION['smart_ip']['location']['longitude'] & $_SESSION['smart_ip']['location']['latitude'] as required - perfect!
But I need to allow my user to override this..
Using HTML5 geolocation. I want to only do this on user request, ie click 'locate me', rather than requesting their location uninvited.
Using one of a few pre-defined locations selectable by the user.
Using an inputed address by the user.
Is there any drupal module I can use for this, or how else could I achieve it?
-
Just to clarify, I am talking about anonymous users here - the general public visiting my site. I just want them to be able to refine their 'location' by overriding the defaults I give them using smart_ip.
I suggest to use Geolocation field and all it's submodules or Geofield. Last one provides more input methods.
Use the Address field module to allow the user create multiple addresses into a node (or even into his profile), Geocoder module to get the lon/lat from these addresses and then a Views to display them in a list.
Same as 2 but without views.
If you want to allow user select one of the 3 methods you can use an other - helper - field (eg a select list with the 3 options).
Finally you should add an extra field to store the lat/lon pair final values maybe with Computed field module or 2 simple textfields that will get the selected values through javascript.

Resources