I'm pretty sure I know the answer to this, but jus...
# general
b
I'm pretty sure I know the answer to this, but just in case I'm missing something obvious - I have been asked to create a saved transaction search that pulls 2 separate line text fields into one results column. Basically each field is a list - Field A and Field B. I need to create one list from A and B to create list C in the results. I can get part of the list from grouping Field A and then in a second search grouping Field B and exporting the results to excel and creating one list of the results (C), but my users want this without the Excel step. Is that possible and if so, what am I missing?
r
use a formula in your saved search that basic mimics what you are doing in excel… concatenating the values.
b
if you're just trying to concatenate, you use double || to concatenate fields/text
b
I did the ||, but it creates a single line item in the result. Let's say Field A says "apples" and Field B says "bananas" on the same transaction line, I want the results to show as: Apples Bananas and not as (this is the results with ||): Apples Bananas
r
then you need to include a ctrl return and two double pipes
value A || ctrl return (appropriate code) || value B
k
I'm thinking she wants it to show up with the same results
i.e. duplicate the lines
in which case, I'm not aware of a way to do this in a saved search without having two searches, downloading them, and mashing them into an excel doc.
could probably script this with N/File in SS 2.0
if it's that big a deal, but big bucks for small gain...
b
Hmm I've never heard of ctrl return in a saved search. I don't know what that does so I'll look into it for the future. I debated the idea of scripting this search but because this search is basically to prove that the tool I developed for a user to do work he absolutely had to do and couldn't find a way to do it natively isn't actually being used, I don't feel like writing another script for this stupid project. Thank you for your help
g
{fieldA}||'<br>'||{fieldB}
👍 1
k
If they really need it, this would be something pretty stupid easy to write a visual basic Macro to do...
b
Hm I've never written a macro and have wanted to venture into learning how to write one (I'm a self taught C# and JS programmer) so maybe I'll use this is as a good way to try to teach myself. Thank you!
k
are you actually needing all the line details repeated multiple times? Or do they just want to see them stacked on one another
because stacked is easy.
I.e.
Copy code
SO DEetails, Field A
              Field B
or
Copy code
SO Details, Field A
SO Details, Field B
The first can be done in your seach, the second I can't think of a way to do it.
b
No unfortunately i need them as individual results, not stacked (so your second diagram). I didn't realize Rebecca was talking about concatenating the fields with a line break sandwiched between them - that doesn't work. The second column of the results is a sum field of the grouped results of Field A (and Field B if I could make it happen).
I didn't think it would be possible because I tried every database formula I could think of but before I go back to the group tomorrow and say "it's not going to work the way they want it," I wanted to confirm with this site since everyone on here is SO helpful and SOOOO much more knowledgeable than I am.
b
what if you created a new custom transaction field and just made it hidden, that was a concatenation of the other two fields? that way you could run searches using that field?