Announcement

Collapse
No announcement yet.

Still not searching product reference field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Still not searching product reference field

    I followed the instructions in the KB and added the '-' character to the list of search characters. Then I did a site update. However, if I search for this term in the product reference field it does not show:

    CR-AS-CD-S520

    Do I need to try a refresh perhaps, or is there some other reason I cannot search on product reference?
    Regards, Tom

    #2
    The refresh did help and now I can get a result by entering the complete product reference text. However, it is necessary to find the prod reference "NC-AS-A7V600" by entering only "A7V600". At the moment I can only get a result by entering "NC-AS-A7V600" and not "A7V600".

    I've looked at the advanced manual but cannot seem to find out how to make it give me a search result on a partial prod reference term.
    Regards, Tom

    Comment


      #3
      Actinic only does partial matching on the beginning of a word. Since it seems that it is the last part of the reference that is most significant, I would try taking the - out of the search list of search characters and strip all but the last part of the reference out of the search string. You would key on the -. Words without a - would not be affected. It would take a few tries to get the right regular expression in the s/// Perl function. I was never good at that. You would put the code above the line:
      # Combine any multiple-white-spaces into single space:
      in search.pm
      I played with this to handle plurals. See my post at http://community.actinic.com/showthr...&threadid=3974
      Bob Ladden

      Comment


        #4
        I have not tested this at all, but try this line:
        $$psSearchString =~ s/\w*-//io;

        It will probably need adjusting. I hate regular expressions.
        Bob Ladden

        Comment


          #5
          Thanks Bob,

          I'm afraid that I'm having a bit of a problem following those instructions. It looks like I need to edit the PERL file after I modify the source csv file to have spaces instead of "-"? Or perhaps I'm to just strip the "-" and make the product reference into one word.

          I can't really parse the product references in the source csv file as it is updated daily from an external supplier and contains 4000 items without building a whole pile of append queries, export queries, and macros, and then scheduling them in access.
          Regards, Tom

          Comment


            #6
            You do not have to edit the CSV file at all. This trick only effects searching.
            Bob Ladden

            Comment


              #7
              OK, I'll try adding that string to the search.pm file and see what happens, thanks.
              Regards, Tom

              Comment


                #8
                Good luck. You may need to modify the line. These expressions are hard to get right on the first try. Turn on search recording (see the advanced user guide) to see what the string gets changed to.
                Bob Ladden

                Comment


                  #9
                  Thanks Bob,

                  I see you sell Science kits. We used to buy and resell similar electronic kits from a fellow in Hong Kong (he was a Brit expat) called DIY electronics. I still have a few kicking around here. My favourites were the bug kits, which we used to place in the boss's truck so he could not sneak up on us while we were trying to get some hard earned rest. (Q: What's brown and sleeps 2? A: A Park Warden truck).
                  Regards, Tom

                  Comment


                    #10
                    You mention that I may have to play with it. Not having any experience with PERL, not sure what it should do in order to adjust that line to try other things. But I'm just refreshing the site now and we'll see what happens. Thanks.

                    Did a refresh and then tested it, seems not to have changed anything.
                    Regards, Tom

                    Comment


                      #11
                      Turn on search recording. Enter lots of strings and see what is recorded. Then post them here.

                      Also did you take the - out of the list of search characters?
                      Bob Ladden

                      Comment


                        #12
                        I said I hate regular expressions!

                        Try this line:
                        $$psSearchString =~ s/(\w*-)+/ /io;

                        This will change CR-AS-CD-S520 to S520

                        Then if you take the - out of the search list of search characters it should find a match on S520. Not perfect, but it would be as close as we can get.

                        BTW, I sell a few of the DIY kits.
                        Bob Ladden

                        Comment


                          #13
                          I had a typo that I corrected in the line. Be sure it is
                          $$psSearchString =~ s/(\w*-)+/ /io;
                          Bob Ladden

                          Comment


                            #14
                            I forgot to take the "-" out, I did it and inserted your corrected string and then refreshed the site. No Luck. How do I turn that recording on? Did not see it in the search settings.


                            That's amazing you have those kits. The fellow that made them did it from a tiny flat in Shamshuipo in HK, I've actually been to his place. I wonder what ever happened to him? We never had much luck selling the kits even though we advertised them in electronics mag's. Small world.
                            Regards, Tom

                            Comment


                              #15
                              See page 56 of the advanced user guide. Post the results here.
                              Bob Ladden

                              Comment

                              Working...
                              X