The Infor Communities is globally accessed system by Infor and its customers, please do not post or upload any content that could be deemed as sensitive, confidential or subject to any data regulation requirements. If you are unsure whether or not the content contains sensitive, confidential or has any data regulation requirements, please seek the advice of your internal security, legal, and compliance experts.

CSI - NEW FORM - Auto Populate Fields

I have created a new form, "Continuous Improvement Report" and have some fields that I need assistance with please.  

1. CIR Number - I would like this to be an auto generated sequential number that automatically populates when a new report is created like the CO Number.

2. Item/Description - I would like to have the Items ComboBox automatically populate with my Items in CSI and then the Description field automatically show the description of the item.  I can get the Items to show by tying the List Source to SLItems, but I can't remember how to then get the Description to show.

Any help you can provide is greatly appreciated.

  • For CIR Number you can:

    • Set the default value for the column in table (SQL Columns form) to AUTONUMBER(STEP(1))
    • Or set the default value for the component on the form to AUTONUMBER(STEP(1))

    The end result is the same. The difference is the first option enforces the action in your database schema whereas the second option is just filling in a calculated value as a form feature.

    For the description field, there are a couple ways of doing what you are asking. One is IDO Property Class formatting, see the Item/Warehouse form and IDO for an example of how to set that up. The second is through a validator. For your Description field, set it to read-only, then under Data Source, Validators, click the ... button. In the Validator dialog window, click the Add button to add a validator. From the list of Validators, select ItemDesc. That will fill in the Description field based on the value of the Item form property, assuming your form has an IDO Property named "Item" in the primary collection.

  • Thank you for your quick reply!  AutoNumber worked great.  I am still having issues with the Item and Description fields, though.  I do have a property named Item and another named Description. These are the settings I have.  Do you see what I may be doing wrong?

  • If you are trying to get the Description to show in the List, you need to have the value 1,2 in the Columns to Display box to show the second property, Description. Column 1 is always the selected value.

  • You need to change Columns to Display from 1 to "1, 2."  You can pick the fields, when you hit the button.

  • Nothing I have tried is working.  Here is my form - Item and Description are two separate fields on the form.   I have the Description field set to Validate as suggested.  Is there an Event or something else that I need to add to get this to work?

    Thank you for your help so far!

  • A list source is what you have defined, but it doesn’t validate by itself.  For that, you will need to use a Validator.  Near that Validate Immediately section, there should be a property for validator.  These validators can be simple checks for making sure it is the list you have defined or complicated ones calling stored procedures and accepting input variables and such. 

     

    In this case, you can use an pre-existing validator called IsInList.  That should do it

  • I already have the Validator "ItemDesc" on the description component.  Do I add the IsInList validator to the Items component?

  • Yes, it is the main property

  • Still nothing.  I now have the IsInList validator set on the Item Component (see below) and the ItemDesc validator set on the Descripion (see below).  When I select an item from my Item drop-down, nothing shows in the description field. =(

  • My apologies, I only read the last reply with the item not validating.  If you data binding is setup to read the description field for the item, the description field will come in when the record is saved when the collection is saved

  • Does anyone have another suggestion on how to get the description to automatically populate when an item is chosen?  This is the last thing I need to get working on this form.

  • What you need is a Component Class with a Validator within that Component Class. Take a look at some standard ones. For example Component Class ItemDescVar. 

    You'll see it has the Validator Item in it and the first parameter passed is used to set the Description Property.

    So if you form has Item and Description property bindings. Do this 

    Remove that List Source from itemEdit you have above. In Component Class put ItemDescVar, then in parameters put the property name of the Description field. That should do it. 

  • I think you are just overthinking this since my original reply. If you are still having issues, direct message me and we can do a Zoom and I can walk you through it.

  • Sometimes simpler approaches work better! Such as adding the Items table to your custom IDO and binding the Description field as a read-only IDO Property. The advantages of that is now the field is filterable and is documented as a part of your schema as opposed to just a value that is popped in on your form from a validator or form script. Also less hits to the database as a validator would have to send a separate request for each record in your collection.

  • I did find that setting AUTONUMBER(STEP(1)) in the IDO property worked better than on the form component itself.  I could not set this as the default value in the actual table column as it said "STEP" was not a valid function.