Topic Options
#52426 - 01/25/17 01:01 PM GV-2nd View based on results of a 1st View?
Samuel Kopstick Offline
Adagio Maestro

Registered: 06/15/07
Posts: 920
Loc: GTA & North America (Remote Su...
We have a View, based on: OE Hist Detail /w Head.
We are using the FIND function to lookup text anywhere in the Description field.
We display many columns, including the Inv #.
(This View is working nicely.)

Our question is:
Can we use the results of this first View, and run a second pass at the data, looking for text that is restricted to the Inv #’s on the first View?

For example, we look for the text “cylinder” and the result is 380 rows.
Now, we want to look again at all the O/E Detail History for the text “new rod”, but only look for this text in the Invoices that are listed in the first View.

Can this be done?
If yes, any suggestions?
_________________________
Samuel Kopstick
S Kopstick & Associates Inc
Toronto, ON

Top
#52427 - 01/25/17 01:25 PM Re: GV-2nd View based on results of a 1st View? [Re: Samuel Kopstick]
Softrak Support Offline

Adagio Action Team

Registered: 03/09/99
Posts: 11549
Loc: Vancouver, BC Canada
Hi Samuel,

Yes, you can use the contents of one view to populate another. You would need to save both views in a workspace, and ensure that from the File menu, you 'Set Workspace Recalc Order' to do the primary view on OE Hist as first.

There is a formula in GridView called GetLinkedValue which is used to read another open View. The Help file describes how to set this up. Alternatively, if both open views are 'connectable', when you create a calculated column in your new 2nd View, you will see an 'External references' selection that allows you to simply choose the desired field, and the GetLinkedValue formula syntax will be automatically populated.

There is another formula called GetLinkedResult which can get summary values (Total, Average, etc) from another view.
_________________________
Regards,
Softrak Tech Support

Top
#52429 - 01/25/17 02:56 PM Re: GV-2nd View based on results of a 1st View? [Re: Softrak Support]
Samuel Kopstick Offline
Adagio Maestro

Registered: 06/15/07
Posts: 920
Loc: GTA & North America (Remote Su...
Thank you - this is helpful.

OK – I am now using GetLinkedValue in the 2nd View (and I have the Workspace set up).
When I now lookup the second text “new rod” (as per my example above), GV displays all the rows.

Many of the rows will have my first text “cylinder” in the calculated GetLinkedValue column.
Where there is no link, the column entry is blank.

I imagine this is how it should work.
So, now my question is: Is there a way to hide all the rows where the calculated GetLinkedValue is blank?
_________________________
Samuel Kopstick
S Kopstick & Associates Inc
Toronto, ON

Top
#52430 - 01/25/17 03:33 PM Re: GV-2nd View based on results of a 1st View? [Re: Samuel Kopstick]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Why would you not just use the "AND()" function to select the records you want? - like this:
Code:
AND(
    FIND("cylinder",{Description},1)<>0,
    FIND("new rod",{Description},1)<>0
   )
_________________________
Andrew Bates

Top
#52431 - 01/25/17 04:20 PM Re: GV-2nd View based on results of a 1st View? [Re: Retired_Guy]
Samuel Kopstick Offline
Adagio Maestro

Registered: 06/15/07
Posts: 920
Loc: GTA & North America (Remote Su...
Andrew:

I wish we could this, but it does not work in this case.

We are searching for any Invoice that has the text: “cylinder”.
Only after it finds all these Invoices, I want to perform a second search, only in this group of Invoices, for the second text: “new rod”.
This would be where the text: "new rod" appears on a different Detail row.

By using the AND function, GV searches for Description lines that has both words on the same row – which is never.
_________________________
Samuel Kopstick
S Kopstick & Associates Inc
Toronto, ON

Top
#52432 - 01/25/17 05:29 PM Re: GV-2nd View based on results of a 1st View? [Re: Samuel Kopstick]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hi Samuel,

OK - you can't use "AND()" because I didn't understand the problem! smile

But the way to get where you're going is to use "GETLINKEDVALUE()" in a Filter for the second View. Lookup the invoice number you are reading in the list of invoices that contain "Cylinder". If the invoice number is found, then check for "new rod" in the detail row.

Filter like this:
Code:
AND(
    TRIM(GETLINKEDVALUE("InvoiceCylinders","Order Key","Order Key"))<>"",
    FIND("new rod",{Description} ,1)<>0
   )

Assuming that the View "InvoiceCylinders" contains the list of invoices with this part. Note linking on the Order Key - just checking if it returns a non-blank value.

This will return only the "new rod" details on invoices that had "cylinders" as an item.

PS. You may want to include "UPPER()" and "TRIM()" functions on the text variables to handle inconsistent entry of the text. It won't catch misspellings of cylinder though! smile
_________________________
Andrew Bates

Top
#52507 - 02/01/17 08:40 AM Re: GV-2nd View based on results of a 1st View? [Re: Retired_Guy]
Samuel Kopstick Offline
Adagio Maestro

Registered: 06/15/07
Posts: 920
Loc: GTA & North America (Remote Su...
Andrew:
Your suggestion for using GETLINKEDVALUE as a filter works very nicely.

It especially seems to work quicker when I create the Link from the first View and in the Edit Link window, I include the Filter (that I created in the 2nd View) to be used.

Thanks again for your help.
_________________________
Samuel Kopstick
S Kopstick & Associates Inc
Toronto, ON

Top


Moderator:  Christa_Meissner 
Who's Online
1 registered (Tanya_Belanger), 67 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14467 Topics
70660 Posts

Max Online: 432 @ 01/20/25 10:17 PM
April
Su M Tu W Th F Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30