Skip to Content

Using chars entered in field in FMS invoked on the field

Hi

I have an FMS linked to a field. Basically, works perfect.

I now want to be able to enter some chars before invoking the FMS (Shift+F2) and using the entered chars to narrow down the results (.. WHERE ... 'chars').

Can somebody help me on getting this together?

How can I use the chars in the field in the FMS?

Thanks

Franz

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2009 at 04:40 PM

    When you say when entering i.e. 'AVB' in 18.1 (DocNum), the FMS does not get the 'AVB'. Instead it gets: N' 0' , where did you actually put that 'AVB' in? $[$18.0.0\] is DocNum, not $[$18.1.0\]. DocNum is a numeric field, it will not accept text. Any texts will be automatically become 0.

    Thanks,

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

    • You are probably right. I know that DocNum is Numeric in the DB. However, I tried to get the String entered in it at least to my FMS to use in there and, of course, the returning value from the FMS is Numeric.

      Unfortunately, B1 does not offer the option to search and select from a list which includes the open Production Orders only. I already got this function with my FMS linked to DocNum, but I try to narrow down the results as it is possible with the default in the ItemCode field.

      Best regards,

      Franz

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 06:09 PM

    Hi Franz,

    Your question is not clear. The simple way for you to ask this question would be given exact query or conditions you need.

    Thanks,

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

    • Query:

      SELECT T1.DocNum AS 'PA-Nummer', T1.ItemCode AS 'Artikelnummer', T1.U_SIA_Rev AS 'Revision', T0.ItemName AS 'Artikelbeschreibung', T1.PlannedQty AS 'Planmenge', T1.CmpltQty AS 'Fertigmenge' FROM  [dbo].[OITM] T0 ,  [dbo].[OWOR] T1  WHERE T0.ItemCode = T1.ItemCode  AND  T1.Status <> N'L'

      This query is linked as FMS (Shift+F2) to the field DocNum in the production order. Basically works and I get a list of the open orders only from which i can chose to open.

      I now want to enter part of the ItemCode (AVB for instance) before invoking the FMS with Shift+F2 and the query should be added by something like:

      ...

      AND T1.ItemCode = +AVB+

      I just don't know I get the string entered into the query.

      Franz

  • Posted on Dec 22, 2008 at 02:26 PM

    ...

    I want

    ... AND T1.ItemCode LIKE $[$18.1.0]

    to compare parts of the string entered in

    $[$18.1.0]

    also, not only all of the string

    how can I do this?

    Thanks

    Franz

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 22, 2008 at 04:31 PM

    Hi Franz,

    If you type the string in ItemCode field then you can define a query like this

    Declare @itemcode as varchar(20)

    set @itemcode =$[$6.1]

    SELECT T1.DocNum AS 'PA-Nummer', T1.ItemCode AS 'Artikelnummer', T0.ItemName AS 'Artikelbeschreibung', T1.PlannedQty AS 'Planmenge', T1.CmpltQty AS 'Fertigmenge' FROM [dbo].[OITM] T0 , [dbo].[OWOR] T1 WHERE T0.ItemCode = T1.ItemCode AND T1.Status = 'L' and T1.ItemCode like '%'@itemcode'%'

    Regards,

    Vijay kumar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.