Is it possible to combine the results of two saved...
# general
l
Is it possible to combine the results of two saved searches?
k
maybe? if they are the same type - you could get creative enough to do it.
alternatively - there isa SuiteApp from alterview that can do this.
but it costs money (even though it's relatively cheap)
m
Or if there is a join between the 2 record types, maybe
k
I guess, it also depends on what you mean by "combine"
👍 1
l
I really run out of ideas. I have two transaction saved searches. The only differences as to columns are the Subsidiary (Sub A and Sub B for the other) and Debit and Credit Amounts (opposite of each other per Sub). The goal here is to create advanced JE lines. That's why the Subsidiary column is different for the two saved searches and the Debit and Credit amounts are opposite of each other. (NetSuite allocation feature can't handle our allocation method.) With these combined saved search results, it will act as an AICJE template ready for import.
k
What you are asking for probably is better as a macro out of excel from a single saved search.
👍 1
You can't make NS return two lines when only one line would be returned.
l
Maybe I wasn't clear. They exactly both have the same columns (but different formulas in Subsidiary column, Debit column and Credit column).
m
Could the formula be placed inside a CASE WHEN? CASE WHEN 'My Existing formula' = Sub1 Then 'Sub1' ELSE '' in one column then in the next column CASE WHEN 'My Existing formula' = Sub1 Then 'Sub2' ELSE '' That might work to have Sub1 in the first column and Sub2 in the second. Might work. I've hacked together something similar in the past to show sales on Monday, Tuesday, etc in columns
w
@KevinJ of Kansas are you referring to Alterview Charts?
k
Something like that.
I looked at it a few years ago with a client - they installed it and were happy with it.
😍 1
I don't remember whether it was the charts app or a different one.
Patrick's solution could work if the source data are different transaction/transaction lines. If you have one transaction line that you are needing to make a debit/credit entry to move however - that won't fix the underlying issue.
👍 1
w
If you really need to split each transaction line in two (one for sub1 and one for sub2). You could create a custom record A that is joined to the transaction and in turn has a two subrecords B. If you perform the search on custom record A and join in all fields from the transaction and also all fields from subrecord B, it could double the result. Then pair that with formulas for Sub, Deb and Cred that looks at which of the subrecords B it is listing.
👍 1
m
I love figuring stuff out. 🙂
w
Not 100% sure of it, but I've seen similar stuff.
l
To give a concrete example, Source transaction: Sub A Amount 100 Saved Search A results: Formula Text (custom label Subsidiary): 'Sub A' Formula Currency (custom label Credit): {debit} * 0.2 Saved Search B results: Formula Text (custom label Subsidiary): 'Sub B' Formula Currency (custom label Debit): {credit} * 0.2
The results shall be combined: Subsidiary Debit Credit Sub A (null) 200 Sub B 200 (null)
k
I'll have to remember that solution that Tomas gave in the future. That said - I had a guy write a 300 dollar macro to do equivalent of that which would cost quite a bit more to do in suitescript..
l
Thanks, everyone. I'll give that subrecord a try. But, is it possible in SuiteScript?
w
Sure, run the two searches, append them after each other and then store the result somehow/where.
m
It wouldnt look pretty - have you tried the new analytic workbooks? As long as the two record types/table has a join, you can pull two tables' results in a single dataset
l
@Watz If it's not too much to ask, can you share a sample script of that or do you know of any article that might help? Can't find one in suiteanswers but if I have a sample I think I can start from there. Thanks!
w
Sorry, don't have anything at hand that does that specifically.
But I'd look into analytics, as @mykke mentions, but since it's the same table that you're looking at, I suppose you can't do a UNION in the GUI(?). But if you can recreate the two searches in the GUI, then you can perhaps extract the SuiteQL and do a UNION with a script.
👍 1
n
There is a newish Netsuite Shared Vendor Bill functionality that might avoid the manually created journal in the first place. https://netsuite.custhelp.com/app/answers/detail/a_id/50763
l
Thanks everyone. I'll take a look at these.
k
It should be noted that shared vendor bills does not post to vendor credits and those must be manually dealt with.