× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

HOW TO USE LOCATE TO RETRIEVE DATA FROM A MULTIVALUE FIELD AND ITS SUB VALUE

  • Atitotito
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago - 7 years 5 months ago #21600 by Atitotito
I am trying to use the locate command to check if a record exists in a multi value field.
I am able to use the LOCATE function to identify the fieldname

i.e LOCATE 'xxx' IN standard.selection<field.name,1> SETTING tmp.pos THEN
store.location = standard.selection<field.value,tmp.pos>
END

i am able to laocate xxx at this point

BUT when i try to locate a record in store.location it fails. Please assist to correct or guide my syntax where wrong


LOCATE 'yyy' IN store.location<1> setting tm.pos
THEN ind = 'Y'
END.
Last edit: 7 years 5 months ago by Atitotito. Reason: to explain my request better

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
7 years 5 months ago #21601 by VK
Hi
It looks like the following change might work:
LOCATE 'yyy' IN store.location<1,1>  ...

... since you're looking for a subvalue.

But I'd suggest to use FIND - it's much easier.

Cheers
VK

Please Log in or Create an account to join the conversation.

Time to create page: 0.024 seconds