According to the documentation on the FIND^DIC API (http://www.hardhats.org/fileman/pm/db_dicf.htm) searches can be based on any cross referenced field(s) by the parameter INDEXES and the parameter SCREEN can provide logical conditions to filter the results.
The value of SCREEN should be MUMPS code that will execute in the context of a given record to set $T true or false to accept or reject the record. I don't see any suggestion that you could supply a computed field expression and have it compile a suitable SCREEN for you, so this by itself does not appear to be usable for filter conditions for general adhoc queries, since the SCREEN code would have to be constructed more or less by hand at the low level to reference global subscripts and piece positions instead of data fields. Is there a suitable API for a SCREEN compiler in Fileman or elsewhere in VistA that could be readily used with RPC or other non-terminal interface? If not, then the database tools in M2Web might be your best starting point. Imran Shafiq wrote: >Hi All, > >I want to write a mumps routine that retrieve records >from a fileman file based on a condition on a certain >field in the file. > >e.g. retrieve records from option file where TYPE >field is equal to "B" i.e. Broker > >The mumps routine has to be silent (no user >interaction) because I want to use this routine via >RPC broker. > >The fileman DBS API FIND^DIC seems to be the solution >but I cant figure out how to put in the condition > >FIND^DIC(FILE,IENS,FIELDS,FLAGS,[.]VALUE,NUMBER,[.]INDEXES,[.]SCREEN,IDENTIFIER,TARGET_ROOT,MSG_ROOT) > > >it seems that the FIND^DIC routine only searches on >the basis of the .01 (name) field of a record. > >Is there any way to search on the basis of another >field in the record? > >Imran --------------------------------------- Jim Self Systems Architect, Lead Developer VMTH Computer Services, UC Davis (http://www.vmth.ucdavis.edu/us/jaself) ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members