Formatted search on invoice

I want to do a formatted search on a invoice, and i must get the LineNumber of each invoice line , and with this linenumber and the docentry, put a value in a userfield(the userfield is in each line) How can i get this linenumber? It's something like $[Item_number.Colum_Number]? Does it iterate itself through de lines?
Thanks!

Hi Miguel Angel,
If you activate the debugging info, you can see that it is the 0 column, so it will be $[$38.0.0] .
38 for the matrix object.
0 for the column.
0 fot the format.
Regards,
Ibai Peñ

Similar Messages

  • Weight Formatted Search on Invoice

    Hi all,
    I need to have the weight of the items on the Invoice screen. The problem is that I have a formatted search on Quantity field and with this, the Weight of the Items do not appear. When I delete the Quantity formatted search, then the Weight appears automatically.
    The FS on the quantity field is: SELECT 0
    The FS on the Weight field is: SELECT ISNULL(T0.[T0.SWEIGHT1],0) FROM OITM T0 WHERE T0.ITEMCODE = $[$38.1.STRING]
    Is it possible to have the FS on the quantity field and at the same time having weight appearing automatically?
    Thanks,
    Pedro Santos

    Pedro,
    What is the link beween the Weight UDF and Quantity field on the Invoice rows.
    Are you trying to make the quantity 0 when the user enter the item and then when the quantity is changed the Weight FMs on the Weight column should fire.
    How is the refresh set on both of these fields.
    Also what do you mean by when remove quantity FMS the weight FMS works?
    Suda

  • Formatted search query for displaying invoice items details

    hi all,
    i need to display all the items in AP invoice.kindly suggest me a query for that.
    in AP invoice
    Ex. row items
    code--descqtyprice--
    total
    I0001--XXXXXXX5--
    100 -
    500
    query should display this row as
    code--desc--
    price
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    =================================
    the query should display as the qty is 5 so it will display the same item 5 times
    kindly suggest me some query for formatted search
    its very urgent
    regards
    sandip

    Hi Sandip,
    DoQuery("Select b.ItemCode from OINV a,INV1 b Where a.DocEntry=b.DocEntry")
    Hope its help for you
    Give me reward points,
    Regards,
    G.Suresh.

  • Formatted Search Supplier Ref# A/P Invoice

    I would like to do an FMS to search for existing supplier ref #s by supplier. This is to save the users keying the entire A/P Invoice and only finding out it has been entered when it is added. I can display existing supplier refs...
    SELECT T0.[NumAtCard] FROM OPCH T0 WHERE T0.[CardCode] = $[OPCH.CardCode]
    I would like to search on the entered 'NumAtCard' and display an error upon entry if it already exists.
    Thanks in advance for your help
    Peter

    Peter,
    Where do you want to place this formatted search or how do you want this to work so that the user will know before hand that this Supp Ref already exists.
    Where do you want the Error to Show.
    Typically, you can set this FMS on the Remarks field and set it to auto refresh when NumatCard (Vendor Ref No) Changes.
    The SQL could be  <b>SELECT 'DUPLICATE SUPPLIER REF' FROM OPCH TO WHERE T0.CARDCODE = $[$4.1] AND T0.NUMATCARD = $[$14.1]</b>
    Let me know if you need further assistance / clarification on this
    Suda

  • Copy Formatted Searches From Sales Order To AR Invoice

    I have a series of formatted searches attched to the Sales Order.  Is there a way to copy these to another document program like the AR Invoice without having to manually assigning them to each individual field.
    Thanks,
    Tom Arnold - ECS

    Thomas,
    I don't think Copy Express is the tool for this.  Copy express is mainly used to company Configuration, User Settings, PLD, etc from one company DB to another.
    To copy FMS from one document type to another is a manual effort.  You need to manually open the document and link the FMS.
    Also make sure that the if the FMS has form refereces they should be Dynamic.  What I mean is...If you are referencing the CardCode on the Sales Order...you SQL code should not have syntax  $\[ORDR.CardCode]...This will only work on the Sales Order.
    You need to make it generic....$\[$4.0.0]..this way it will refer to the Card Code when added to any marketing document.
    Suda

  • Formatted Search on A/R Invoice Row level

    Hi All,
    I need your help to do some arithmetical functions on UDFs.
    I have three UDFs at row level of A/R Invoices.
    U_MRP, U_AssValue (Unit & Totals -> Amount)
    U_abtment (Unit & Totals -> Rate)
    I want to do below process, but it gives me error.
    Select ($($38.U_MRP) - ($($38.U_MRP)* $($38.u_abtment))/100) * $($38.11.0)
    but it gives me error. Can any body help me to correct this query to set on U_AssValue as formatted search.
    Its very urgent & Important for me.
    Best Regards,
    Chintesh Soni

    Hi,
    I tried by creating UDF as u mentioned. For me its working perfectly.
    i will tell u how i created UDF created.
    MRP --> Units & Total --> Amounts
    AssValue --> Units & Total --> Amounts
    abtment --> Units & Total --> Rate.
    Save the query as A/r in query generated.
    Select ($[$38.U_MRP.number] - ($[$38.U_MRP.number] * $[$38.U_abtment.number]) / 100) * $[$38.11.number]
    Called this query in the AssValue, Qty --> 2, MRP --> 123, abtment --> 123 final output --> -58.
    Please remove http:// and add set bracket over there.
    Above query is working fine.
    Sagar

  • Problem With Formatted Search.

    Hi to all,
    I have linked a formatted search to a UDF that lies at row level in AP Invoice. This field is used to display the Sales  Order Price. The requirement is that from SO we create a purchase order and subsequently create a goods receipt and AP invoice.. Now in invoice it is showin perfectly fine whether it is copied from goods receipt or purchase order.. But in the purchase order and goods receipt screen this query will not work. And the same query used in AP invoice is being linked to these documents. Is there any work around for this?? Is it possible to run queries based on the form numbers?? If so ho do i pull the form number in the formatted search query??
    Please Help!!!!
    Regards
    Aris

    I recommend creating separate queries for each document.
    ie
    1 formatted search to lookup price on sales order from AP Invoice
    1 formatted search to lookup price on sales order from GRPO
    1 formatted search to lookup price on sales order from PO
    then change the lookup to pull fields from the document that you are using as a reference.
    when you are building the formatted searhes start by returning the values that are you are using as a reference. That way you are sure that you are pulling the correct information.
    Then layer in the lookup to the sales order.
    If you get stuck I recommend that you copy and paste the formatted search in SQL Server management studio and replace the variables refereces with real values.
    In my experience troubleshooting queries is more effective when using SQL Server management studio. (the error reporting is better).

  • Simple formatted search

    Hi,
    I'm trying to learn how to use formatted searches and SQL in SAP Business One. Can anyone give me some simple examples to start with?
    For example, on AR Invoice, if customer (OINV cardcode) is X, a UDF field should be populated 'Y". If customer (OINV cardcode) is not X, UDF field should be populated 'N'.
    Can you provide me the SQL code for the query to be used in the formatted search? Just looking for some examples to get started.
    thanks

    Thanks Gordon, that worked!
    How do you know that $[$4.0.0] is OINV,cardcode(BP name on AR invoice)?
    For example, if I want to use a different field intead (like Item No.) how do I know the paramater/variable to sue?
    I guess $[   ]  means a user input paramater(not yet saved to database)?

  • Addition of two rows values in table  using formatted search

    hi all,
            i have created one UDF field in market document rows, now in AR invoice i need to add the values in the UDF fields of two rows, want to show it in anather outside UDF in title. kindly suggest me some query to track that.
    Ex:- i had entered two items in rows and
    for first UDF row i have given 20
    for second UDF row i have given 30.
    now i need to show sum of the two UDF in two rows in title UDF.
    kindly give me some query used for formatted search to do this task.
    regards
    sandip

    Sandip,
    To the best of myknowledge When you try to take the row value to the header the results of the Formatted Search are not consistent.
    but for your interest, I am giving below the logic to work this out.
    You need two Header level user fields.  One to copy the row user fields value and the other to store the sum.
    You can create a simple SQL "SELECT $[$38.U_UserFieldName] (substitute with row level user field name) and attach it to the first header level user field and make it Auto refresh on doc total.
    Then Attached SQL  "SELECT $[ORDR.U_HeaderUserField1] + $[ORDR.U_HeaderUserField2]"
    The results could be flaky because the header user field takes the value of the active row and sometime it only considers the first row active though you might be entering the second row of data.
    My recommendation would be to Use The Transaction Notification Stored Procedure for this by which you can be absolutely sure that the Header User field will have the sum.
    Let me know if you need directions for this.
    Regards
    Suda

  • Formatted Search in Incoming Payments

    Hi All, I require some assistance with a formatted search and query please.
    I have create a UDF at a header level in an invoice - the value will be either D or blank.
    I have then created a UDF at a line item level in the incoming payment window.
    I would like to create a formatted search that looks at the invoices at the line item level in the payment window, and returns the value from the invoice (D or blank).   Any assistance on what the query should be would be greatly appreciated.
    Also, as the invoice numbers are variable fields, what field should be used for the 'auto refresh' option?

    Hi Lisa,
    It is very difficult to have create FMS that can be linked to header from row since it has different table. Row table and Header table are different. Why could you try to use the info from invoice table directly that can return value from it (D or blank) as you want ? what is the point in the invoice that can return the value ? is it invoice number ?
    Rgds,

  • Applying formatted search to checkbox

    I want to set the Payment Block checkbox on AP Invoice automatically when a new invoice is created.
    I tried to do it with a formatted search, but you cannot apply a FMS to a checkbox field.
    Is it possible?
    B1 version 2005A SP01 PL18.
    Regards,
    Douglas

    Dear Douglas,
    It is not possible to assign formatted search to a checkbox field.
    But you can create a small addon in SDK and whenever any invoices will be created
    through the application, it will catch the docentry of the invoice and
    then it will set payment block for that invoice by using the property
    "PaymentBlock" of oPurchaseInvoices object.
    Regards,
    Rakesh Pati
    SAP Business One Forum Team

  • Formatted search authorization

    hi.
    i have created a normal user ap. ap has full authorization for "define formatted search".
    when ap logs in and tries to do formatted search on the warehouse feild in A/R Invoice, the message is that he is not permitted to perform the action.
    what other authorizations should be enabled to let him select the warehouse on pressing Shift + F2
    thnks, laks.

    hi.
    i gave authorization for my query group and it worked.
    a million thanks.
    best rgds, laks.

  • Extra Discount in Marketing Documents - Formatted Search

    Hello All,
    I am trying to add a UDF for "Extra Discount" in the marketing documents. I have tried to attach a formatted search on the document total to calculate the final value after this extra discount has been specified. However, the formatted search doesnt work and I get an "Internal Error".
    The scenario mentioned underneath will explain the requirement:
    <b>Default Option in SAP:</b>
    Customer                               C0001
    Item        |       Price     |        Discount       |      Tax      |     Total
    I0001      |       100         |        10%           |       VAT@4   |   90
    Total                                    90
    Discount                     5%    4.5
    Tax Amount                         3.42
    Doc Total                             88.92 
    <b>Requirement:</b>
    Customer                               C0001
    Item        |       Price    |         Discount     |        Tax        |   Total
    I0001       |      100      |           10%           |       VAT@4  |    90
    Total                                    90
    Discount                     5%    4.5
    <u>Extra Discount            2%    1.8</u>
    <b>Tax Amount                         3.348
    Doc Total                             87.048</b>
    Is it possible to have this scenario mapped in SAP Business One using formatted search without using SDK/Customization?
    Regards,
    Gyanesh Rupani

    Hello Jimmy,
    The client wants the extra cash discount to be visible on the invoice itself. I have tried creating the UDFs and assigned appropriate FS to them to change the document total. However, the issue is that the moment the document total is affected, the discount (available by default in marketing documents footer) automatically gets changed proportionally!
    So, for eg. if an invoice is for 1000 USD and I give a discount (system field) of <b>10%</b> to a customer and 5% as cash discount (UDF), with the help of FS, the invoice amt automatically gets changed to 850 USD but the discount field also automatically gets changed to <b>15%</b>!
    This is the inbuilt functionality of SBO - so if someone can help me overcome this, I will be very grateful.
    Regards,
    Gyanesh

  • Date Difference Query Syntax Formatted Search

    Hi Experts,
    My client renders a service(warehousing of Cargo) on time and material basis,therefore the Quantity column of the AR Invoice represents the number of days the cargo was warehoused.
    I want to create a formatted search with reference to a query on this field to help me compute the number of days automatically. The number of days is normally calculated by Subtracting the the Admission date(Serial Number Details Table "OSRI", field "InDate" from the document date of the invoice) from the AR invoice document date.
    Considering that the Item is serial number managed, the item serial number will connect the Serial Number details table to the AR Invoice table.
    Can anybody help me with the syntax of the query that will achieve the above for me.
    Waiting to hear from you .
    Thanks

    If you have many serial numbers for an item, there will be no way to identify which serial number was actually selected in the invoice till the time the Invoice is added.
    So knowing the Serial Number that was selected on that Invoice is important and what you select in the Serial number selection window on the Invoice is stored in temporary location and cannot be referencing by looking into OSRI table.
    If there are multiple serial numbers with different InDate's, how could you calculate?
    Is there a Delivery Step?  Delivery > Invoice
    OR
    Do you copy SO > AR Invoice directly
    Suda

  • Formatted search in other form

    Helo for all,
    A have a question. Is possible make a formatted search in a field in the other form?
    Ex. I'm on screen of invoice and i want get a value of field the other screen (Purchase Invoice).
    Is possible? How To?

    Hi,
    as much as i know formatted searches don't work between different opened forms.
    i suggest you to make a small addon for this.
    regards
    David

Maybe you are looking for