I have predefined item combination (for example brand1|brand2|brand3 etc) in the table.
i like to collect brands and check against with predefined table data.
For example i collected brand1|brand2|brand3 then i can do get some value form that predefined table(it meets the condition).
How can i check?
brands would be unlimited. also brand1|brand2|brand3 of brand1|brand2| exist then returns true.
Okay, taking a wild guess at what you're asking, you have a delimited field with brands in them separated by a | character. You want to return any row that has the right combination of the brands in there, but don't want to return rows with, for example, brand "testify" in them when you search for "test".
You have four search conditions (looking for brand3):
the brand exists by itself: "brand3"
the brand starts the delimited field: "brand3|brand4|brand6"
the brand is in the middle of the field: "brand1|brand3|brand6"
the brand is at the end of the field: "brand1|brand2|brand3"
so, in SQL:
SELECT *
FROM MyTable
WHERE BrandField = 'brand3'
OR BrandField LIKE 'brand3|%'
OR BrandField LIKE '%|brand3|%'
OR BrandField LIKE '%|brand3'
Repeat as required for multiple brands.
Related
I have a collection with job titles and question id's called colFunctions. I want to compare the job titles in the collection to a single known job title (a text value) and return a list of question id's.
So for the function Jr. System Administrator I want to get a list with ID's of Q01 and Q03, but not Q02.
I have this so far, but it says I can't compare a table to a text value. How can I overcome this?
ClearCollect(
colMatchedFunction,
Filter(colFunctions,Function = Office365Users.UserProfileV2(galleryDirectReports.Selected.userPrincipalName).jobTitle).QuestionID
);
If Function is a text column in SharePoint, or a multi-select choice column? If it is a text column, you can use the in operator, which can check if a the text contains the given id:
ClearCollect(
colMatchedFunction,
Filter(
colFunctions,
Office365Users.UserProfileV2(galleryDirectReports.Selected.userPrincipalName).jobTitle).QuestionID in Function
));
In a multi-select choice column, you can still use the in operator, this time to check if a value belongs to a table, checking it against the 'Value' property of the multi-select column (which returns the text value represented by the choice):
ClearCollect(
colMatchedFunction,
Filter(
colFunctions,
Office365Users.UserProfileV2(galleryDirectReports.Selected.UserPrincipalName).jobTitle
in Function.Value
));
Relatively new to Blue Prism,
I have a collection that looks like this, with 100+ rows:
Results
Answer
Timestamp
8 Apr 2021
Name
ABC
I'd like to manipulate the data such that if Results = 'Name', Get the Answer (aka ABC) and put it into a data item.
Is there any way to do this?
I understand I could hardcode i.e. Get value based on Row Index and Column Index, but my data is complex and may not always have the same rox index.
Can you use the collection filter to get a collection output? The utility has an action to filter where you can input a collection and then use
[FieldName] Like "some value"
This would result in every complete row in the collection that matches the filter.
I'm looking to try do the following;
I want to have say 3 columns.
Transaction | Category | Amount
so I want to be able to enter a certain Name in Transaction say for argument sake "Tesco" then have a returned result in Category Column say "Groceries" and I can enter a specific amount then myself in Amount Colum.
Thing is I will need to have unlimited or quite a lot of different Transactions and have them all in pre determined Categories so that each time when I type in a Transaction it will automatically display the category for me.
All help much appreciated.
I know a simple If Statement wont suffice I can get it to work no problem using a Simple IF Statement but as each Transaction is different I don't know how to program further.
Thanks.
Colin
Use a lookup table. Let's say it's on a sheet called "Categories" and it looks like this:
| A | B
1 | Name | Category
2 | Tesco | Groceries
3 | Shell | Fuel
Then, in the table you describe, use =VLOOKUP(A2, Categories!$A$2:$B$3, 2, FALSE) in your "Category" field, assuming it's in B2.
I do this a fair bit using Data Validation and tables.
In this case I would have two tables containing my pick lists on a lookup sheet.
Transaction Table : [Name] = "loTrans" - with just the list of transactions sorted
Category Table : [Name] = "loCategory" - two columns in table, sorted by Both columns - Trans and Category
Header1 : Transactions
Header2 : Category
The Details Table:
the transaction field will have a simple data validation, using a
named range "trans", that selects from the table loTrans.
the transaction field will also use data validation, using a named
range, but the source of the named range ("selCat" will be a little more
complex. It will be something like:
=OFFSET(loCategory[Trans],MATCH(Enter_Details!A3,loCategory[Trans],0)-1,1,COUNTIF(loCategory[Trans],Enter_Details!A3),1)
As you enter details, and select different Transactions, the data validation will be limited to the Categorys of your selected transactions
An example file
I couldn't make the title clearer, but here's what I need help with.
I have a custom page type [1] for Leaders which includes 2 fields: Name, and Title. This holds the list of all leaders at the company.
I have another custom page type [2] for Speaking Events, which includes a field called Speaker to display the speaker's name and title. This field was set up as a drop-down list with data source from a SQL Query to query the Leaders data in [1].
Select LeadersID, Name, Title from co_leaders order by Name
I got it work fine - the drop-down displays a list of Name. However, what I wanted to display in the drop-down option is: Name, Title (not just Name) like below so that I only pick one and have both Name and Title. Is it possible to do this?
John Doe, CEO
Jane Doe, CFO
Hope it's clear and thanks for your input!
This is the SQL you are looking for:
SELECT LeadersID, Name + ', ' + Title FROM co_leaders ORDER BY Name
You need to do a concatenation of the column values (Name and Title), as opposed to selecting the columns separately.
EDIT: This is assuming that Name and Title are not nullable fields.
If there is a NULL value in any of the concatenated fields, the end value will be NULL. In this case, you will need to use COALESCE (or an equivalent function) to define an alternative value. For example:
SELECT LeadersID, Name + ', ' + COALESCE(Title, 'Member') FROM co_leaders ORDER BY Name
Problem
I have two queries, one contains product data (data_query), the other (recode_query) contains product names from within the data_query and assigns them specific id_tags. id_tags are also column names within the data_query.
What I need to achieve and fail at
I need the data_query to look at the id_tag of the specific product name within the data_query, as parsed from the recode_query (this is already working and in place) and input the retrieved value within the specific custom column cell. In Excel, I would be using INDEX/MATCH combo:
{=INDEX(data_query[#Data];; MATCH(data_query[#id_tag]; data_query[#Headers]; 0))}
I have searched near and far, but I probably can't even spot the solution, even if I have come across it, as I am not that deep in the data manipulation and power query myself.
Is this what you're wanting?
let
DataQuery = Table.FromColumns({{1,2,3}, {"Boxed", "Bagged", "Rubberbanded"}}, {"ID","Pkg"}),
RecodeQuery = Table.FromColumns({{"Squirt Gun", "Coffee Maker", "Trenching Tool"}, {1,2,3}}, {"Prod Name", "ID2"}),
Rzlt = Table.Join(DataQuery, "ID", RecodeQuery, "ID2", JoinKind.Inner)
in
Rzlt