Formatted Search Numbering Wildcards

I've seen lots of numbers used in formatted search queries on these forums, and it looks like they are used as wildcards (as mentioned below) so that a single query can be used for all marketing documents for instance.  Is there a list somewhere that shows which numbers correspond to which tables and fields?
"Note!!! You can replace the $[ORDR.CARDCODE] string (in the query) with the $[$-4.0.0] string, and the $[ORDR.NUMATCARD] string with $[$-14.0.0] string. Using these alternative strings will enable SAP Business One users to activate this query in other marketing documents, by changing only the name of the related table."
My specific question involves a UDF.  I have a row level UDF in my marketing documents called "OrderType", which lets us specify if it is a Normal order, Sample order or a Service order.  Depending on which is selected, my formatted search automatically changes the G/L Account field and COGS Account field on the same row.  Can I use a single query for all marketing documents instead of having one for each table?  Below is my query that is currently functional for sales orders.
SELECT
  CASE $[RDR1.U_OrderType]
    WHEN 'Normal' THEN 5000
    WHEN 'Sample' THEN 6125
    WHEN 'Service' THEN 5803
  END $[RDR1.U_OrderType]
FROM RDR1 FOR BROWSE

As long as you do not include any table names in your query, it applies to all your marketing documnets.  You can find this info by View - System Information.
Actually, you should create another UDF in the item master. The UDF in all your Marketing Row levels will get this info.
Your query will looks like:
SELECT
  CASE $[$38.U_OrderType.0]
    WHEN 'Normal' THEN 5000
    WHEN 'Sample' THEN 6125
    WHEN 'Service' THEN 5803
  END

Similar Messages

  • Problem when create auto numbering in BP master using Formatted Search

    Hi all,
    I have a problem in creating auto numbering in BP for Customer type using Formatted search
    My query is like this
    declare @tempNo as char(20)
    set @tempNo=(select  Isnull(max(REPLACE(OCRD.CardCode , LEFT(OCRD.CardCode,10),'')),0)  + 1
    from OCRD where (CardType ='C') and LEFT(OCRD.CardCode,3) = 'CU.' )
    set @tempNo='CU.'left(convert(varchar,GETDATE(),112),6)'.'+@tempNo
    select cast(@tempNo as char(20))
    It should be creating the new number for example
    CU.201101.1
    CU.201102.2
    CU.201103.3
    CU.201103.4
    The format will be like this CU.YYYYMM.autonumbering
    So if the current year is still the same it will always increase the number and it will reset the number become 1 if the current year is change.
    But when i execute the number , the number doesn't increase, still generate the last number CU.201103.4
    I have use this query in generate item number, it runs well but different format.
    Is there some thing wrong with my query?
    Thanks in advance
    Regards
    Jia shun

    Hi Jia shun,
    You have posted an identical threads. There is no such need. Please close this one and response to the one with answer already.
    Thanks,
    Gordon

  • Formatted Search Document Numbering

    Dear Experts,
    I am trying to place a formatted search in the document number series of PO to change it to a particular numbering series whenever the supplier code starts with '0'.
    This is the query i have tried.
    SELECT CASE WHEN T0.[CardCode] Like '0%%'  THEN 'Comms'
    It just seems to come back with an internal error, is this possilbe? if so how?

    Hi,
    Please check this :
    SELECT CASE WHEN T0.CardCode Like '0%%' THEN 'Comms' END FROM Table Name
    Table Name =  from where the cardcode field is selected.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Help needed for Formatted Search

    Hai Experts,
    would like to ask you some clarification on Formatted Search. In the
    query I found $http://$44.2.1 given in the criteria part.
    In some articles it was mentioned that, the 44 meant for the table
    connected with the form and 2 is field index and so on.
    Can you please explain how to find out those numbers and field index.
    I need to work out planty of FMS to fetch data into
    UDF automatically based on user input.
    Regards
    Anand

    Hi Anand,
    You may check these threads first:
    Re: Vendor default GL FMS help
    Re: Runtime data calculation
    Thanks,
    Gordon

  • Formatted Search - Restrict to Only One Customer on Activity Window

    Hello Experts:
    Am trying to create a formatted search to provide a suggested RMA Number on the Business Partners > Activity window in a UDF.
    While in Activity, the user should get a list of ONLY the one customer they are currently working with.  So if C0001 is being used in the Activity window, the list should show all suggested RMA numbers just for that customer of C0001, not any other customer. 
    When I use the following it shows all customers.
    --FMS 6BP Automated RMA Number
    SELECT
    T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode]))
    FROM OCLG T0
    INNER JOIN OCRD T1
    ON T0.CardCode = T1.CardCode
    ORDER BY
    T1.CardCode Desc,
    T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode])) Desc
    When I put in WHERE T1.CardCode = $[$ 9.0.0 ] in the right place it shows nothing...
    Any ideas on how to make only the one current customer in Activity window appear in the list???
    Thanks in Advance - Zal

    Thanks Istvan and Gordon...
    Istvan - that is the same as my SQL - just do not know how to show the $[$... correctly in this forum - it always goes to that http thing.
    Gordon - tried to use your SQL but it gave me an error of "Internal Error (-1003) Occured [Message 131-183] every time I tried to click on the magnifying glass.  However, due to your last line in the SQL it gave me an idea that eventually they were OK with - namely, the highest number to the top of T0.ClgCode...
    Thanks again guys - Zal

  • How to delete a custom format in Numbers 3

    I am one of the poor unfortunates that has upgraded to Numbers 3 BIG mistake!!
    However does anyone know how to delete a custom format in Numbers 3?
    I'm not sure where the custom format came from in the erlier version of numbers. I guess I must have created it for something, I can't remember what.
    It now appaers that when I send a Numbers 3 document via email to an Excel format  it adds a weird custom format that turns currency into garbage. Once in Excel simply going to format cells and deleting this odd format cures the problem.
    If I could find a way of deleting it in Numbers 3, hopefully the problem will go away.
    This is far from the only problem I'm having with Numbers 3. It's begining to look like I'll have to abandon Numbers 3 having had to go to the expense of buying a new iPad because Numbers 3 documents (and presumably Pages Keynote etc) no longer work on the original iPad.

    I never promote the method the deletion unless you understand the underlying tables of planning, if you search on the forum you will see posts on the subject just like this one - Delete dimension from planning application
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • 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).

  • SQL Query -How2bring multiple results into one field using Formatted Search

    Hi Everyone
    i am trying to bring in the results of the field dbo.Lot_ITEM.LOT using a formatted search into a row level using the following query:
    SELECT     dbo.LOT_ITEM.LOT
    FROM       dbo.DLN1 INNER JOIN dbo.LOT_ITEM ON dbo.DLN1.ItemCode = dbo.LOT_ITEM.ITEM
    WHERE     dbo.LOT_ITEM.ITEM=$[DLN1.ItemCode]
    however the result of the dbo.Lot_ITEM.LOT field could be more then one value depending on how many lots are assigned for that item
    (for example this query would be similar to assigning batch/serial numbers to an item being despatched - as you can choose multiple batches/serials depending on the quantities available and required and then move from the left to the right side of the selection window) if that makes sense!
    is it possible to bring in the multiple results into one field? and how can i amend the above query to include this?
    Thankyou in advance :o)
    Edited by: Asma Bi on Apr 23, 2008 7:22 PM
    Edited by: Asma Bi on Apr 23, 2008 7:24 PM

    Hi Suda
    Thanks for replying :o) but im not sure about the query?
    just to simplify it (as the query im working with is to do with 3rd party addons) i have used the serial/batchs field instead and used standard demo database fields from SBO 2005 sp01:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode='g1000' and dbo.ixvSerialNoFact.SRI1_BaseEntry = '193'
    The above brings me the relevant results but when i change it to be used in a formatted search:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode=$[dln1.itemcode] and dbo.ixvSerialNoFact.SRI1_BaseEntry = $[dln1.DocEntry]
    i cant seem to get it to work - now this may be because the serial number is not allocated until teh record is added to the system, however when this happens i am unable to go back in and manually trigger the query as the delivery note rows cannot be selected!
    i  think as what im originally wanting an answer for is same as this example, im wanting to know if this is even possible?
    Thanks
    Edited by: Asma Bi on Apr 24, 2008 3:53 PM
    Edited by: Asma Bi on Apr 24, 2008 3:55 PM

  • Formatted Search issue

    I have a UDF attached to a Purchase Order, Goods Receipt PO and Batch Numbers for Items.  B1 automatically carries the UDF data forward from the Purchase Order to the Goods Receipt PO.  However, I am trying to create a Formatted Search that will also bring that data into the Batches Setup transaction when a Goods Receipt PO transaction is being added.  Since the Goods Receipt PO record is not yet written when the Batches Setup screen is activated, I somehow need to access the UDF data from POR1 from the Batches Setup screen (OIBT).  I don't seem to be able to find a way of writing my query for the formatted search that is able to return the data from POR1 to my UDF in OIBT.  Any ideas of how I might be do this?

    Timothy,
    The values in the Purchase Order / Goods Receipt screen are not available in teh Batch Number screen.
    You will need to use a temp table to store the values from the Purchase Order / Goods Receipt screen.
    You will set a formatted search on one of the columns of the documents row.  Through this formatted search you will insert the data into the temp table and from the Batch screen you will read the values from this temp table
    Suda

  • Include the "created by" field in formatted searches

    Hello
    Very stupid question : how do you include the "created by" (usersign) field in a formatted search for marketing document ? Where do you find the variable numbers since this field is not visible on screen ?
    Thanks for your help
    Fabrice

    HI Milton Rafael Mazzali ,
    $[USER] will display user number only.
    First decided where u want to display user name. Create a formatted search for that field with this Query  "SELECT T0.U_NAME FROM OUSR T0 WHERE T0.INTERNAL_K = $[USER]" and select auto refresh when customer code/name changes.
    This will work.
    Regards
    Ramesh Kumar

  • 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,

  • Formatted search problem

    Hi,
    i've a problema with a formatted search:
    i want to create a serial number's substring to copy in a user Field.
    i want to launch this query automatically, and i want to update this user field when the user create serial numbers, without the user launch this query.
    this is my query:
    SELECT  DISTINCT SUBSTRING (T0.[IntrSerial], 11,9) FROM OSRI T0  INNER JOIN SRI1 T1 ON T0.SysSerial = T1.SysSerial WHERE T0.[ItemCode] = 'ST_2400_4X2_SL' and  T0.[IntrSerial] = $[$3.54.0]
    Anyone can help? thanks a lot

    Hi,
    the query i s ok, but i have to start it manually, although i want to start it automatically when the serial number field is written, how can do it? Thanks a lot

  • 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 on Service Call

    Dear All,
    Im trying to write a formatted search on the Service call screen to retrieve the email address of a queue. The queue is in the general tab of the Service call. You can add user defined fields for the service call-title, service call -solutions, service call- activities etc.
    I have added the userdefined field on the service call-title.
    My formatted searches can access all the other header details on the service call but I cannot get the queue data in the general tab.
    Kindly assist,
    Thanks,
    Indraj.

    HI Indraj,
    On the user defined fields area if you want to use the formatted search, use must have to use the table and field names inside. (also if you have any field which not represented by variables eq: hidden fields):
    $[TABLE_NAME.FIELD_NAME]
    if you use normal fields area, and you have the variable on the form:
    $[$ITEMUID.COLUID.TYPE]
    where Type is:
    0 for gerenal
    NUMBER for numbers,
    etc.
    So Your solution is:
    SELECT T1.[email] FROM OSCL T0  INNER JOIN OQUE T1 ON T0.Queue = T1.queueID WHERE
    T0.[callID] =$[OSCL.callID]
    Regards,
    J.

  • Formatted search not updating

    Hello Experts,
    I have created a Formatted search on AR invoice document for an UDF and auto refresh is set on Document series.
    The FMs works fine for all series except for one which is set as default in document numbering. The values are in UDF not shown when this invoice is created with this series.
    Is there any limitation for FMs when set to auto refresh on an series with default one.
    Thanks
    Deepak

    Hi Deepak,
    UDF will refresh only when Series will change. This is Limitation.
    So Try to refresh UDF on some other field so that you can get Value in UDF for Default Series also.
    Regsrds::::
    Atul Chakraborty

Maybe you are looking for

  • Oracle spatial datasets

    Are there any sites from where i can get spatial data that can be downloaded to Oracle Spatial. I am doing project on spatial datawarehousing, so need some real data on climatic conditions for some span of time. I have searched a lot on google but ca

  • Ora-12154  problem with database link and transparent gateway

    Hello, I’m trying to make a communication between oracle and SQL server 2005. I use oracle 10g E.E Release 10.2.0.3.0 and the transparent gateway for SQL server 10201_gatway_win32.zip. Install: The oracle database is installed into a server named ss-

  • How do i get my computer to start itunes when i plug my ipod in please

    Dear All, How do I get my computer to start up itunes when I plug my ipod in.

  • Loss on connection speed

    Hi out there,   I just purchased wireless router wrt54-gs and adapter wusb54gsc for my laptop. Installation went ok and got system up and running. When I first starting using system my signal strength was excellent and connection was at 54mpbs. Check

  • What can I extract from PS7, and should I?

    I have an older mac which runs PS7, It's old and slow like me but I've read that its possible to extract stuff from the guts of the programme and save it to PE8 which I'm using on a newer faster upgraded macbook, which can't run PS7. What can I use,