{{tag>category:"OpenInsight Specific"}} [[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== Simple questions (OpenInsight Specific) ==== === At 07 MAY 1998 08:15:39AM Oystein Reigem wrote: === All, First Question: How can one list the names of all fields in a table in field order? I tried run rlist "LIST DICT.OBJEKT WITH F1=F' BY F2", 1 but the sort order wasn't numeric, so field 10 followed field 1. (I solved the problem by listing out F2 too, copying the result and letting my word processor do the sort. So I don't really [i]need[/i] an answer, it's just that I felt there must be some obvious way I missed.) This First Problem begat the Second Question: How can one force the BY sort to become numeric? Can one do that without changing the field type? - Oystein - ---- === At 07 MAY 1998 08:33AM Steve C. wrote: === Oystein, Try this: . run list_dict "fb_inspections", "column_pos","column_name","formula","column_type","column_pos","column_name" . . Hope this helps... Steve C. ---- === At 07 MAY 1998 08:35AM Steve C. wrote: === Oystein, Try this: . run list_dict "FILENAME", "column_pos","column_name","formula","column_type","column_pos","column_name" . Change FILENAME to your table name.. type the rest exactly as shown. . . Hope this helps... Steve C. ---- === At 07 MAY 1998 09:17AM Oystein Reigem wrote: === Steve, Great! I wasn't aware of List_Dict. - Oystein - ---- === At 08 MAY 1998 07:22AM Cameron Revelation wrote: === Hi Oystein, I prefer the Arev ListDict imitation below. Cameron Purdy info@revelation.com COMPILE ROUTINE LD(CHARSTR TABLE) ROWDEF(CHARSTR) declare subroutine Msg, Send_Dyn * verify the dict table convert @lower_case to @upper_case in table if table 1,5=DICT." else table=DICT.": table end * open the dictionary open table to f_table else Msg("", "Table ": quote(table): " does not exist") return end * select the dictionary clearselect 0 select table by "COLUMN_TYPE": @fm: "COLUMN_POS": @fm: "COLUMN_NAME" using 0 else Msg("", "Error selecting the ": quote(table): "table") return end * listdict header: * 12345678901234567890 1234 123456 123 123 123456789012345 1234 123 * key Send_Dyn(fmt("Listing of dictionary ": quote(table): ":", "L#73")) Send_Dyn(" ") Send_Dyn("Column Name......... Type Master S/M Pos Data Type...... Just Len") Send_Dyn("-------------------- ---- ------ --- --- --------------- ---- ---") eof=0 loop readnext key else eof=1 until eof read rec from f_table, key then if rec=F" or rec=S" then master=fmt(rec, "B") text =fmt(key, "L#20"): " " text := fmt(rec, "L#4" ): " " text := fmt(master, "L#6" ): " " text := fmt(rec, "L#3" ): " " text := fmt(rec, "R#3" ): " " text := fmt(rec, "L#15"): " " text := fmt(rec, "L#4" ): " " text := fmt(rec, "R#3" ) Send_Dyn(text) end end repeat Send_Dyn("") return ---- === At 08 MAY 1998 08:46AM Oystein Reigem wrote: === Cameron, Thanks! I've already started using it. - Oystein - [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=96A06F5A5C0BA8C1852565FD004359DC|View this thread on the forum...]]