Topic Options
#61806 - 09/13/19 05:54 AM Separate by commas in Gridview
L10 Offline
Adagio Enthusiast

Registered: 03/22/17
Posts: 25
Loc: Ontario
Looking for some advice:

I have a field in IC that holds multiple values separated by commas that I want to reference individually to another view. For example:

In IC:
Code:
{Comments 2}="2,3,40,45,73"


In Ref View:
Code:
2="A"
3="F"
40="ABC"
45="XYZ"
73="OOO"


I want to make the Gridview return
Code:
"A,F,ABC,XYZ,OOO"


While this sample is short the actual data is much more characters which is why I cannot fit it inside {Comments 2} example:
Code:
"mast:home,mast:commercial,primary:antenna,pimary:wireandcable,sub:cable,sub:coax"


Our thought is we would reference a number to each one of these tags.

Thanks in advance.
_________________________
Lance Tennier
TDL Canada

Top
#61807 - 09/13/19 08:00 AM Re: Separate by commas in Gridview [Re: L10]
Bruce Gardner Offline
Adagio Wizard

Registered: 06/15/04
Posts: 3504
Loc: Toronto ON, Canada
Hi Lance:

Each numeric tag matches to a specific text string?

Have you looked at the Named Item feature in GV? That would allow you to create a list that maps your tags to a text description (the tags could be letter rather than digits). You would use the function GETNAMEDITEM() to extract the text string.

GV formulas don't have a looping construct to handle a variable number of tags in a field. However look at the CHOOSE() function which will select a tag from a comma separated list.

I haven't tried this but I think it will work.
_________________________
Bruce Gardner
ARX Business Solutions Inc.

Top
#61809 - 09/13/19 09:02 AM Re: Separate by commas in Gridview [Re: L10]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10493
Loc: Canada
Hi Lance,

Just a comment about Bruce's "Named Item" suggestion.

These predate GridView's ability to read Excel spreadsheets and are certainly a reasonable suggestion for what you are trying to accomplish.

However, in my experience, I have replaced all my "Named Item" lists that I used historically with Excel spreadsheets that are loaded into Workspaces for reference. The Excel sheets are easier to maintain, and with the "File | New External" can be stored in a common Folder.
_________________________
Andrew Bates

Top
#61810 - 09/13/19 09:11 AM Re: Separate by commas in Gridview [Re: Retired_Guy]
Bruce Gardner Offline
Adagio Wizard

Registered: 06/15/04
Posts: 3504
Loc: Toronto ON, Canada
Hi Andrew:

I considered that but I wasn't certain how that would work in this case. Lance has a "one-to-many" situation where a single IC Item would have to locate multiple rows in the lookup file (whether it be Excel or a Named Item). Can he do that using Excel as a linked table? I'm not even certain that a Named Item can do it because I haven't tried it, but I think so. smile
_________________________
Bruce Gardner
ARX Business Solutions Inc.

Top
#61811 - 09/13/19 09:39 AM Re: Separate by commas in Gridview [Re: Bruce Gardner]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10493
Loc: Canada
Hi Bruce,

Actually, Lance will want to use "TABLEFIND()" to look up the values in another View. It has the looping capability that I think is necessary here.

There is a description of the function in the F1-Help text and in the Release Note where it was added in 2014.
_________________________
Andrew Bates

Top
#61824 - 09/16/19 05:20 AM Re: Separate by commas in Gridview [Re: Retired_Guy]
L10 Offline
Adagio Enthusiast

Registered: 03/22/17
Posts: 25
Loc: Ontario
Thanks Andrew,

I believe that is what I am looking for. I will give that a try.

Thanks
_________________________
Lance Tennier
TDL Canada

Top


Moderator:  Christa_Meissner 
Who's Online
0 registered (), 26 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Forum Stats
1848 Members
5 Forums
14242 Topics
69746 Posts

Max Online: 359 @ 11/18/19 09:08 PM
May
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 31