Re: Finding a child record on a set's form
On a form based on a set only the indexes for the parent are available.
giving the region focus for purposes of setting an index and doing a find.
Alpha Software Mobile Development Tools: Alpha Anywhere | Alpha TransForm |
lines = count(Details->lnkfld,grp->header)
cnt=parentform.lines.value if cnt>0 parentform:browse1.Fetch_First() for i = 1 to cnt if browse1:descr.value=[I]search string[/I]' whatever basis you want the match to be made end ' found match stops on that "record" end if if i<cnt parentform:browse1.Fetch_Next() 'don't overshoot end if next i end if
lines = count(Details->lnkfld,grp->header)
cnt=parentform.lines.value if cnt>0 parentform:browse1.Fetch_First() for i = 1 to cnt if browse1:descr.value=[I]search string[/I]' whatever basis you want the match to be made end ' found match stops on that "record" end if if i<cnt parentform:browse1.Fetch_Next() 'don't overshoot end if next i end if
lines = count(Details->lnkfld,grp->header)
cnt=parentform.lines.value if cnt>0 parentform:browse1.Fetch_First() for i = 1 to cnt if browse1:descr.value=[I]search string[/I]' whatever basis you want the match to be made end ' found match stops on that "record" end if if i<cnt parentform:browse1.Fetch_Next() 'don't overshoot end if next i end if
dim m_phrase as C '>>>> insert text box to collect search phrase if a5_get_records_in_query("msprod",s_quote(m_phrase)+" $ description")>0 m_phrase=upper(m_phrase) 'be sure search fragment is upper case cnt=parentform.lines.value if cnt>0 parentform:browse1.Fetch_First() for i = 1 to cnt current=upper(msprod->desc) 'be sure field to compare is upper case if trim(var->m_phrase)$current 'test for presence of phrase in product description end ' found match stops on that "record" end if if i<cnt parentform:browse1.Fetch_Next() 'don't overshoot end if next i end if else ui_msg_box("SEARCH ERROR","The search phrase you are using does not find a match. ",64) end if
dim m_phrase as C '>>>> insert text box to collect search phrase if a5_get_records_in_query("msprod",s_quote(m_phrase)+" $ description")>0 m_phrase=upper(m_phrase) 'be sure search fragment is upper case cnt=parentform.lines.value if cnt>0 parentform:browse1.Fetch_First() for i = 1 to cnt current=upper(msprod->desc) 'be sure field to compare is upper case if trim(var->m_phrase)$current 'test for presence of phrase in product description end ' found match stops on that "record" end if if i<cnt parentform:browse1.Fetch_Next() 'don't overshoot end if next i end if else ui_msg_box("SEARCH ERROR","The search phrase you are using does not find a match. ",64) end if
browse1.fetch_first() browse1.locate_next(VAR->m_phrase ,"desc")
browse1.fetch_first() browse1.locate_next(VAR->m_phrase ,"desc")
Comment