Auto Populate Prompt value

i would like to read a QUERY build from Query Manager via Peoplecode
&sQryName = "";
&aRunQry = %Session.GetQuery();
&sQryName = "MY_QUERY";
If (&aRunQry.Open(&sQryName, False, False) <> 0) Then
MessageBox(0, "", 0, 0, "failed to open query");
Else
&aQryPromptRec = &aRunQry.PromptRecord;
&strQryName = &aRunQry.Name;
If &aQryPromptRec <> Null Then
*>>>>>>>>> how to AUTO POPULATE with EMPLID '1234' to my prompt? <<<<<<<<<*
*&nResult = Prompt(&strQryName | " Prompts", "12345", "12345", "12345", &aQryPromptRec);*
&aRowSet = &aRunQry.RunToRowset(&aQryPromptRec, 0);
If &aRowSet.RowCount > 0 Then
MessageBox(0, "", 0, 0, "got records retrieved. %1", &aRowSet.RowCount);
Else
MessageBox(0, "", 0, 0, "No records retrieved.");
End-If;
End-If;
End-If;

If the actual filter criteria is only col1 the instead of displaying the values in the second prompt, make a separate report and only choose only the 2nd col in that report and make col1 as prompted and select appropriate title for that report.Place the report above the actual report in dashboard. So it will display only those records which are chosen in col1 from the prompt.

Similar Messages

  • How to auto populate data values on Material Class in Classification?

    Hi,
    I created 10 characteristics and assigned them to a class (type 001 for Material). This class I added in Material Master under Classification.
    These 10 characteristics contains 2 key values where these 2 values able to retrieve the rest of 8 characteristics, which stored in different customize tables.
    Is there a way to make when user enter 2 key values of the characteristics in the class and the rest of 8 characteristics would be auto populate base on these 2 key values?
    USER_EXIT or something?
    Please help.
    Aish  T.T

    Hello,
    You can either use jquery/jaavscript or infopath form to achieve this. There is no default way to do this.
    I would suggest jquery because you can put script in newform/editfor.aspx page using content editor webpart. Refer this link for jquery:
    To get value from list:
    http://social.technet.microsoft.com/Forums/en-US/ac47fe2a-ccb6-4f5b-b274-703aecc6cb0a/get-list-items-in-sharepoint-2010-by-using-jquery
    http://www.robertkuzma.com/2010/08/read-list-items-using-sharepoint-web-services-and-jquery/
    To set value in column:
    http://paulgalvinsoldblog.wordpress.com/2009/06/13/quick-and-easy-use-jquery-to-set-a-text-field%E2%80%99s-value-on-a-sharepoint-form/
    http://spservices.codeplex.com/discussions/468729
    If you use infopath form, then you need to create two data connection to get data from both lists. Later you can set value in fields based on selection using rule. This can be possible without code.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How do I set (or auto populate) the value of a modal dialog field using javascript?

    I have a Modal Dialog on my SharePoint 2010 page the following fields: Your Name, Subject, Priority, Message. 
    It links to a list I have on the site. The second field, Subject, I want to auto populate it when the window opens, so the user can leave it as is or modify the subject. I want to set the field value using javascript. 
    I've tried setting the field with this code:
    document.getElementById('Subject').value = "Test";
    and also, this:
    setFieldValue('Subject','My custom value');
    Neither work. 
    How do I set the value of the subject field when the user first opens the dialog using javascript?
    Please help.

    I am sure, you are looking at default field value of a list column(single line) in a modal window, if so please try below code
    <script src="https://code.jquery.com/jquery-2.1.0.min.js" type="text/javascript" abp="397"></script><script type="text/javascript" abp="398">
    $(document).ready(function(){
    $('input[name*="Subject"]').val("Test");
    </script>​​​​​​
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Auto-populate Field value From a File Picker Window

    I have a PDF form with many fields where my users are required to enter the filename of documents. I am using Adobe Acrobat 9 Pro
    I've been trying to find a way to create a field Action that does the following:
    User clicks field
    File browser window opens
    User selects relevant file
    Filename and extension is placed into the field that was clicked
    Any tips or suggestions on how to implement this would be welcome.
    Additionally, if it is possible, could it support multiple field/documents in a single interactions. Example: User clicks field1 and selects 5 files. The files filenames are placed in fields1, field2, field3, field4, and field5 respectively.
    P.S.
    I am not trying to attach files to the PDF. I just want the filenames to be placed into the form.

    Are the files being selected PDF files, or other types? There's another method that can be used for file selection, but it only lists PDF files. It is possible (at least on Windows computers) to use it to select any file-type, but it's a bit tricky...
    If not, using a hidden field is your only option. But you can reset if after copying the file-name to the other field, like this:
    this.getField("FilePath").browseForFileToSubmit();
    var filePath = this.getField("FilePath").value;
    this.getField("FileName").value = filePath.substring(filePath.lastIndexOf("\\")+1);
    this.getField("FilePath").value = "";
    If you use this code (as the button's Mouse Up action), make sure you remove all other codes associated with the text fields. And you don't need to create a duplicate field for each file selection field, only one will do... It can even be placed in a doc-level function so you only have to call it from each button and have the code itself in a single location.

  • Auto populate values in the the database table

    Hi All,
    I have a requirement where user enter values in one of the ZTransaction. This will update a Ztable. So the new requirement is to add two new columns in the fields, which is completed. Now this two new fields are supposed to auto populate values based upon the key field .
    The transaction code is defined with Transaction as SM30 and Default values as
    Name of the screen field     value
    Update                               X
    VIEWNAME                      "table name which the values are updated".
    Please let me know how to do this.
    Thank you!!

    Hi Swetha,
    I am unsure of what you are trying to accomplish so I will make a few assumption and perhaps you can find some benefit in it.
    I suppose you are trying to add new fields to a custom (Z) database table.
    If so then use SE11 to add the two new columns.
    After this is complete then rebuild the table maintenance by using the following path: SE11-> Utilities->Table Maintenance Generator.  (Remember to double check the Recording Routine Radio button.)
    If the user needs fields automatically populated then check the following link.  It describes how to use table maintenance events.  I suppose you need to use Event 01 and Event 05.
    http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
    Good luck and reward points if helpful,
    AK
    Moderator message -  Asking for points is against the Forum's RoE
    Message was edited by: Suhas Saha

  • Using JavaScript to auto populate a field based on numeric value of a separate drop down field

    Hello, I am trying to set up a simple, I hope, javascript which will enable to me auto populate one field based on the numberic value of another field using Acrobat Pro XI.
    Essentially I have 2 drop down fields (we'll call them DD1 and DD2).
    DD1 is the sum of 8 preceding drop down values. That sum can be anywhere from 0 - 40. Whatever that sum falls within a range which identifies a rating. The ratings and ranges are below:
    0-8: Non-Performer  
    9-16: Low Performer  
    17-24: Performer  
    25-32: High Performer  
    33-40: Exceptional Performer
    DD2 is where the rating ("non-performer", "low performer", etc.) will be captured. Instead of requiring the user to look at DD1, determine the value, and then identify and input the rating manually, I would like DD2 to auto populate the rating based on the value (sum) in DD1.
    For example, if DD1 shows a value of 27 then DD2 would auto populate "High Performer". So how do I write this code or execute this? In excel I would use an if, then statement. Is there something similar in Acrobat Pro XI.
    Any help is greatly appreciated. Thank you in advance.

    If you use a text field, the custom calculation script could be:
    // Custom calculation script for text field
    (function () {
        var s = getField("DD1").valueAsString;
        // Blank this field if input is blank
        if (!s) {
            event.value = "";
            return;
        // Convert string to number
        var v = +s;
        // Set this field's value based on the input
        if (v <= 40 && v >= 33) {
            event.value = "Exceptional Performer";
            return;
        if (v < 33 && v >= 25) {
            event.value = "High Performer";
            return;
        if (v < 25 && v >= 17) {
            event.value = "Performer";
            return;
        if (v < 17 && v >= 9) {
            event.value = "Low Performer";
            return;
        if (v < 9 && v >= 0) {
            event.value = "Non-Performer";
            return;
        // If none of the above fit, blank this field
        event.value = "";

  • How to Auto-populate TextField in Acrobat x with a value determined by user check box selection?

    I have a group of 3 Check Boxes for user to select their Work Shift:  The check boxes are set up to be mutually exclusive (same name: "EMP_Shift", different Export Values: Day, Evening, Night).
    Form Field properties name:      EMP_Shift (for all 3 check boxes)
    Acrobat edit panel field names:  EMP_Shift#0, EMPShift#1, EMPShift#2
    Export Values:                         Day, Evening, Night (chose these only because they are descriptive)
    I need to Auto-populate a Text Field named EMP_WorkShift with "Day" if EMP_Shift#0 is selected, "Evening" if EMPShift#1 is selected, or "Night" if EMPShift#2 is selected.
    Is there a script I can use to accomplish this in Acrobat Pro X.

    The simplest is to set up the text field to be calculated using the following custom Calculate script:
    // Get the value of the check box
    var v = getField("EMP_Shift").value;
    // Set this field value
    event.value = v !== "Off" ? v : "";
    You'd normally set the text field to be read-only, but if you want the user to be able to edit the text field, you can instead use the following script in the Mouse Up event of each check box:
    // Get the value of the check box
    var v = event.target.value;
    // Set the value of the text field
    getField("EMP_Workshift").value = v !== "Off" ? v : "";

  • Can you auto populate IPTC core values?

    Hi
    Every time i want to populate the iptc core values in bridge i have to do them manually. Quite a few are always the same, ie, email, creator etc. I usually cut and paste from another image which is time consuming
    Can i somehow auto populate some fields with the same text everytime?
    thanks
    simon

    If you select multiple files at once you can add metadata to them in one go by filling just the wanted metadata in the wanted fields and after apply all selected files are saved with the filled metadata.
    But you can also create a metadata template (metadata panel top right tiny menu icon, create metadata template) and fill in all usual data like name, address, copyright info etc.
    Either select the files you want to change and from same menu choose append metadata (you can create several templates and choose from them using this menu) or use Photodownloader and select the copyright template to be written to the files upon import.
    Many ways to use this powerful function in Bridge

  • Is it possible to auto-populate a row of cells based on a pop-up value...

    ... that references a value from a column of another table?

    EDIT: I note that Jerry has posted much the same solution about the time I was called for dinner (followed by part 2 of the mini series we started watching last night). I'll leave this one up for the tutorial aspects. Other than the use of pop-up menus in Table B, they're essentially the same.
    Also, I see I highlighted the wrong ground beef row on the Ingredient table. The correct (93%) one is the one transferred to the second table. Oops!
    Barry
    dlconnolly wrote:
    Good Point, should have done that in the first place. Also, thank you very much for giving this a shot to help me out. Below are my tables that I am trying to link (they did not post as tables so I hope that doesn't further confuse the situation).
    Goal: In Table B/Recipes, I would like a drop-down/pop-up option in the 'Ingredient/Column A' column. Based on the choice of ingredient, I would like the Fat/Carbs/Protein row of cells for that ingredient to auto-populate with the data drawn from Table A/Ingredients.
    I used the LOOKUP function: =LOOKUP(A2,Ingredients :: Asparagus:'Turkey Breast ', {Ingredients :: B2:D23}). The error message I get is: "B2:D3}" isn't a valid reference.
    Hi dl,
    Looks like the problem is in the formula above. (repeated with comments below)
    <PRE>
    Table A: "Ingredients"
    Ingredient Fat Carbs Protein
    Asparagus 0 5 3
    Blueberries F 0 10 1
    Blueberries R 0 21 1
    Broccoli    0 6 2
    Chicken Bre 9 13 35
    Chickpeas 3 27 6
    Cous Cous 0 36 6
    Eggs        10 2 12
    Grapes     0 16 1
    Green Beans 0 10 2
    Ground Beef 90% 9 0 21
    Ground Beef 93% 6 0 25
    Mozz nonfat 0 4 32
    Mozz par tsk 16 3 24
    Olive Oil 14 0 0
    Pork, ground 18 0 22
    Quinoa     4 20 4
    Sour Cream 2 1 0
    Spinach    1 5 4
    Turkey Breast 0 4 20
    Table B: (end product)
    Ingredient Fat Carbs Protein
    Grnd Bf 93% 6 0 25
    Broccoli    0 6 2
    Quinoa     4 20 4
    </PRE>
    Posting a screen shot is easier than getting a table to align itself properly here, as the forum software must be forced into recognizing tabs as tabs. Screen shots must be hosted elsewhere (eg. Photobucket, Picasa, Flickr), then the HTML link supplied by the hosting site (on some sites in a "Share this" menu) can be entered into your post to call the image. Be sure to check the Preview tab here (before posting) to see what your post will look like.
    Here's your LOOKUP formula. I've replaced the square brackets, parsed by the forum to indicate a link, with curly brackets so they would be visible.
    =LOOKUP(A2,Ingredients :: Asparagus:'Turkey Breast ', {Ingredients :: B2:D23}).
    The error message I get is: "B2:D3}" isn't a valid reference
    "B2:D23}" perhaps?
    LOOKUP is discussed on p 217 of the iWork Formulas and Functions User Guide.
    It's syntax is:
    LOOKUP(search-for, search-where, result-values)
    So your formula,in English reads:
    Search for: the contents of cell A2 (on this table)
    In: the Table "Ingredients" in the columns "Asparagus" to "Turkey Breast"
    and return the results in the same row in the columns from B to D in the rows 2 to 23}
    I get an (expected) "invalid reference" message for Asparagus:'Turkey Breast '
    (Possibly due to my leaving 'use headers as column and row references' unchecked)
    Replacing that with the range in which the ingredients are listed (A2:A21), the error message changes to the one you quote.
    Even ignoring the square brackets, D23 is an invalid reference on my table, which ends with "turkey breast" in row 21. But even with the specified range completely on the table, the Invalid reference message remains, indicating the square bracket is a problem.
    My assumption is that it's there because you are attempting to define the results range as an array including all three columns from which you wish to gather results. Won't work.
    From p 217 of the iWork F&F User Guide:
    Usage Notes
    Both search-where and result-values are normally included and *are specified as either*
    *multiple columns or multiple rows, but not both* (one dimensional). However, for
    compatibility with other spreadsheet applications, search-where can be specified as
    both multiple columns and multiple rows (two dimensional) and result-values can
    be omitted.
    Editing to limit the result value array to a single column, and removing the square brackets gives a working formula for cell B2 on Table B:
    =LOOKUP(A2,Ingredients :: A2:A21, Ingredients :: B2:B21)
    Three further edits to the formula are needed before filling down and right to the rest of the active cells in Table B.
    The first is to make the column, but not the row, absolute in the cell address for search value so that this reference changes as the formula is filled down, but not as it is filled right.
    The second is to make both the columns and rows of the cell addresses specifying the search range absolute so that this range does not change as the formula is filled down, then right.
    The third is to make the rows (only) absolute in the result range so that they do not change as the formula is filled down, but do change as it is filled right, ensuring that we retrieve the values from the correct column of "Ingredients" to the corresponding column of Table B.
    These are done using the menu revealed by clicking the triangle that appears on the cell range reference when the mouse is placed on it in the formula bar. When done, the formula should look like this:
    =LOOKUP($A2,Ingredients :: $A$2:$A$21, Ingredients :: B$2:B$21)
    Finishing touch:
    As is, the formula will return error messages in rows where there is no entry in column A of Table B. To eliminate those, trap the error using IFERROR:
    =IFERROR(formula,"")
    (replace formula with the formula above, leaving off the = sign)
    Regards,
    Barry
    PS: The iWork Formulas and Functions Guide may be downloaded through the Help menu in Numbers. You'll also find the equally useful Numbers '09 User Guide at the same location. Both are highly recommended.
    B
    Message was edited by: Barry

  • Script Help required to Auto-populate the Time Period Value

    Hi Experts ,
                    Time Period object was defined in System
    I have a collection M_ED_SYS_CE with M_ED_YR as collection field .
    M_ED_YR field is a Time Period Picker (i.e. values are like "Year 2011" , Year 2010)
    my requirement was to auto-populate the M_ED_YR collection field with Time Period object . No manual Interruption
    Also I need to increment and auto-popualte & set  the Time Period values for all  existing M_ED_YR Collection fields .
    Can any one please clarify if TimePeriod objects defined in System is of VLV type or String Objects
    Any suggestions are highly Apprecaited .
    thanks in Advance
    Tayi

    REsolved

  • Insert prompt value as column in report...

    Hello,
    We use reports to populate the recipient list of our campaigns (the segmentation wizard does not meet our needs). The source code assigned to each campaign is as follow, 'YYYYQX', with YYYY being the year of the campaign and X being the quarter of the campaign. During the creation of the report, the year of the campaign is specified by the user through a prompt. The same applies to the quarter. I am trying to build the report in such a way that the data can be downloaded as a .csv file and reimported directly into Siebel, without manual editing, to populate the recipient list for the campaign. This means that I would need to extract values provided by the user through the prompt to automatically populate the source code column in my report. For instance, if the user picked year 2008 and quarter 3 as prompt values, the source code column should be "2008Q3" for each record included in the report.
    Any thoughts?
    Thanks in advance,
    JP

    Thom,
    Thanks for the quick answer! This helps me with the formatting part of the problem. The part which still remains to be answered is how to obtain the value specified by the user as a prompt. I use a prompt with a "less than" condition on the field which records when our contacts gave their consent to be entered into our system (we refer to it as consent date). I also use a prompt to filter contacts based on the quarter of the consent date.
    For illustration purposes, if the user runs the report for the 2008 Q1 campaign (i.e. prompt for year set to 2008, and prompt for quarter set to 1), the report will include all contacts who were entered in the system during Q1 of year 2008, 2007, 2006, 2005 and so on. In this specific instance, I would like to see "2008Q1" as a constant column labeled "source code" since it will be the corresponding source code for the campaign in which we will later on import the output of the report to create the recipient list. Right now, the only way I can think of getting the information to populate the "source code" column is to obtain data directly from the prompt, if at all possible. If not, any other way to get there would be great.
    I hope this makes sense!
    Thanks,
    JP

  • Showing prompt value in report - Need Urgent help

    Hi All,
    I have created a query that has a prompt (it is not the dashboard prompt) that has " in Between" operator. It is on date column. When i am generating report by passing the prompt value the data is coming properly.
    I have downloaded the report in excel format and it is coming perfect. But i am not able to provide the data that he has selected in the prompt.
    Like on top of page i need to show - The report is genrated for Date1 to Date2.
    And then the data.
    Thanks in advance for any clue. I am not able to figure out how to do this.
    Thanks
    Ashok

    Hi Ashok,
    It seems it's possible, but not with the Filters view... but with Narrative View....
    If you have Calendar Date (which contains all dates till today) column in your model, then... if you want to show only the date prompt values on top even though you have all other prompts...
    For above mentioned criteria... you can't show only one date using filters view...
    Now... go with Narrative View,
    In that particular report add Calendar Date column 2 times...
    On one column apply Max(date) and on another column apply Min(Date)....
    Hide those...
    Now note down the positions of these above 2 columns in criteria... say 6 & 7... respectively...
    Now you write in narrative view...
    Selected Date between @ and @6
    So... based on the dates you selected.. the calendar date populate with the values and would hold the max and min i.e. what... selected values of your prompts...
    So by using this.. you can only show.. one prompt.... not all the prompts which you have...
    May helpful to you when you have .. Calendar Date only... remember ;)
    Thanks & Regards
    Kishore Guggilla
    Edited by: Kishore Guggilla on Nov 20, 2008 7:52 PM

  • Auto-populate fields in Custom Object Based on Another Record

    Hello,
    I am hoping to auto-populate a few default values in a new Custom Object record based on an associated Lead record. The layout is this:
    I use the Lead record to take care of most of the information in the sales stages until the product is sold. The Lead record has fields to record information for a one product sale. The sales person can then use the Custom Object (called 'GX Additional Product') (which shows up in the Related Information section of the Lead record) to add additional items to a sales order request. Many of the fields in the GX Additional Product (custom object) record are identical to fields already filled out in the Lead record.
    What I would like to do, is when a new GX Additional Product (custom object) is added to the Lead record, those identical fields already filled out in the Lead record, by default, populate the corresponding fields in the new GX Additional Product (custom object) record.
    Is this possible? Is this something that can be done with JoinFieldValues? If so, I've had a bit of confusion trying to set up a JoinFieldValues expression.
    If you have any information to share that would be helpful, that would be greatly appreciated! THANKS!

    Hi,
    You can use JoinFieldValue to Custom Objects from other entities, cause you will have other objects' ID recorded inside the CO's, when you open a new detail record associated with the parent. Make sure your custom object is showing as a detail section (N:1) into lead´s main page. Try with one field first, using the exact syntax provided at samples listed at product documentation.
    regards,
    Flavio Amorim
    Brazil
    www.triscal.com.br

  • Auto populate text fields with a trigger such as entering text into input fields in ADF

    Hello all,
    I am not able to auto populate text fields with a trigger such as entering text into input fields in ADF.
    I tried AdfFacesContext.getCurrentInstance().addPartialTarget(val); in the back end using setter method of input text field.
    its not working ..
    is there any way to achieve it
    Regards,
    Shakir

    Hi,
    Always mention your JDev version.
    The valueChangeListener would fire only when you set the autoSubmit property of the field to true. Can you elaborate your requirement? What do you mean by related data? Are you performing some sort of search?
    If you want to get the value you entered on the field, just set autoSubmit to true and get the new value from the valueChangeListener. If your requirement is something like as and when you type, do something, you need to check out this approach :https://blogs.oracle.com/groundside/entry/auto_reduce_search_sample
    -Arun

  • How to auto-populate dates in a calendar based on radio buttons?

    Hi,
    I'm trying to create an availability form that is submitted on a monthly basis. What I'd like is to have a radio button the user could click to indicate what day the first of the month falls on (Monday through Sunday), and have fields auto-populate with the remainder of the dates on the calendar. As it stands right now, I've got the radio buttons and the text fields, but I'm running into serious issues getting the text fields to auto-fill based on the selected radio button.
    I've labelled the radio button group "First Day of Month" and the individual values are "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday" and "Start". The "Start" button is hidden but is checked by default.
    My text fields are even simpler: "Monday 1" "Monday 2" "Monday 3" "Monday 4" and "Monday 5" (and then, obviously, repeated for each day of the week.
    I am horrible at scripting, so I think that might be where I'm running into issues. What I'd like to put is something like this (only, you know, functional, and for each days' text value):
    For "Monday 1"
    if "First Day of Month.value" = "Monday", "Monday 1.value" ="1"
    else "Monday 1.value" = ""
    For "Wednesday 3"
    if "First Day of Month.value" = "Sunday", "Wednesday 3.value" = "11"
    if "First Day of Month.value" = "Monday", "Wednesday 3.value" = "17"
    if "First Day of Month.value" = "Tuesday", "Wednesday 3.value" = "16"
    if "First Day of Month.value" = "Wednesday", "Wednesday 3.value" = "15"
    if "First Day of Month.value" = "Thursday", "Wednesday 3" = "14"
    if "First Day of Month.value" = "Friday", "Wednesday 3.value" = "13"
    if "First Day of Month.value" = "Saturday", "Wednesday 3.value" = "12"
    else "Wednesday 3.value" = ""
    For "Sunday 5"
    if "First Day of Month.value" = "Sunday", "Sunday 5.value" = "29"
    if "First Day of Month.value" = "Friday", "Sunday 5.value" = "31"
    if "First Day of Month.value" = "Saturday", "Sunday 5.value" = "30"
    else "Sunday 5.value" = ""
    Is this possible? I have no doubt there's a better way to do it (with proper coding and everything), so any help would definitely be appreciated!

    Hello,
    Which sharepoint edition you are using? I would prefer to customize your list form in infopath form then add new connection which will connect to your SQL. Later you can filter data based on cust ID. Here is the link to add connection in infopath:
    http://office.microsoft.com/en-in/infopath-help/add-a-data-connection-to-a-microsoft-sql-server-database-HP010092823.aspx
    If you want to do it via code then simple ADO.NET connector will help.
    http://www.codeproject.com/Articles/33862/Connecting-to-Database-Using-Custom-Webpart-in-Sha
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

Maybe you are looking for