Arif's Profile
Agile Angel
2642
Points

Questions
19

Answers
200

  • Agile Angel Asked on October 21, 2020 in Product Collaboration.

    Did you perform any AD Migration recently??

    • 891 views
    • 2 answers
    • 0 votes
  • Agile Angel Asked on October 21, 2020 in Agile PLM (v9).
    Try : for Orphan:
    select distinct item_number from item where id not in (select i.id from bom b, item i where b.item_number=i.item_number) and delete_flag is null and class=10000;
    • 718 views
    • 2 answers
    • 0 votes
  • Agile Angel Asked on March 10, 2020 in Agile PLM (v9).

    Hi Fatima,

    Please see the attached document for reference. It has detailed steps of migrating all db users to ldap or migrating a particular users from db to Agile.

    How to Convert a Database User to an LDAP User? (Doc ID 568607.1)

     

    Regards,

    Arif

     

    • 1240 views
    • 4 answers
    • 0 votes
  • Agile Angel Asked on March 10, 2020 in Product Collaboration.

    Hi Surya,

    Simple query as shown below should be helpful to find MPN without Where-Used-Items

    Select distinct m.id,m.part_number from Manu_Parts m where delete_flag is null
    and m.id not in (Select distinct manu_part from manu_by mb where mb.active=1);

    Regards,

    Arif

    • 985 views
    • 2 answers
    • 0 votes
  • Agile Angel Asked on March 2, 2020 in Agile PLM (v9).

    Hi Kalyani,

    You can check -> https://myagileplm.com/question/how-to-fectch-redline-bom-table-of-a-affected-item-in-a-change-using-db-query/

    Somehow i could see my old answer not coming up there so i added it back. Please check and see if it helps.

    Regards,

    Arif

    • 1870 views
    • 3 answers
    • 0 votes
  • Agile Angel Asked on March 2, 2020 in Agile PLM (v9).

    Not sure, where this query disappear.  Try this out:

     

    SELECT ch.change_number AS change_number,
    itp.item_number part_number,
    bom.item_number AS component_part_number,
    itc.description,
    quantity,
    CASE
    WHEN prior_bom = 0
    THEN ‘Added’
    WHEN change_in <> change_out
    AND prior_bom <> 0
    THEN ‘Modified’
    WHEN prior_bom <> 0
    AND change_in = change_out
    THEN ‘Delete’
    END AS redline_action,
    CASE
    WHEN change_in <> change_out
    AND prior_bom <> 0
    THEN
    (SELECT quantity FROM agile.bom WHERE id = bom.prior_bom
    )
    END prev_qty,
    bom.change_in,
    bom.change_out,
    bom.prior_bom
    FROM agile.bom bom
    INNER JOIN agile.item itp
    ON itp.id = bom.item
    INNER JOIN agile.item itc
    ON itc.id = bom.component
    INNER JOIN agile.change ch
    ON ch.id = bom.change_in
    WHERE ch.change_number = ‘YourChangeNumber’;

     

    Regards,

    Arif

    • 1998 views
    • 3 answers
    • 0 votes
  • Hi Nagma,

    Can you elaborate more on the error.  Also as it’s a multi-list value generally appending the value is the right way to go.  Sharing a general flow of how i did earlier.

     

    //you want to set/append the multiVal LOV to a multi-list attribute PAGE_TWO.MULTILIST11

    public static String multiVal = “Services;Switching;CORP”;

    //You can specify your source attribute.

    String attributeValue = m_item.getValue(ItemConstants.ATT_PAGE_TWO_MULTILIST11).toString();

    //append the desired value to existing value.

    String newAttr = attributeValue.concat(“;”).concat(multiVal);

    String[] strArr = newAttr.split(“;”);
    ArrayList<String> list = new ArrayList<>(Arrays.asList(strArr));
    System.out.println(“List: ” + list);

    //You can give the desired cell where you want to set the value
    ICell m_cell = m_item.getCell(ItemConstants.ATT_PAGE_TWO_MULTILIST11);
    appendValuesToMultiListCell(m_cell, list);

     

    —-Your append to Multilist method looks something like this

    public static void appendValuesToMultiListCell(ICell cell, ArrayList<String> valuesList) {
    try {
    System.out.println(“List value is “+ valuesList);
    System.out.println(“Inside Set Multilist value”);
    if (null != valuesList && !valuesList.isEmpty()) {
    int valuesListSize = valuesList.size();

    String[] attributeValueArray = new String[valuesListSize];
    for (int i = 0; i < valuesListSize; i++) {
    attributeValueArray[i] = valuesList.get(i);
    System.out.println(“Value List is ” + valuesList.get(i));
    }
    // Set the final list of values
    IAgileList agileList = cell.getAvailableValues();
    agileList.setSelection(attributeValueArray);
    cell.setValue(agileList);
    }
    System.out.println(“Updated Values are :” + cell.toString());
    } catch (Exception e) {
    e.printStackTrace();
    }

    }

     

    Regards,

    Arif

    • 1176 views
    • 2 answers
    • 0 votes
  • Agile Angel Asked on September 16, 2019 in Software Development Kit (API).

    I am not totally clear about your requirement here. Based on your comments, my understanding of your issue is as below. Let me know:

    You are able to  set supplier while creating User but have having issues while trying to set a different supplier?

     

    • 1182 views
    • 2 answers
    • 0 votes
  • Agile Angel Asked on September 12, 2019 in Software Development Kit (API).

    Hi Jaydeep,

    It shouldn’t be an issue actually. Tried with sample code with existing supplier as well as with  creating a new supplier and it worked all fine.

    In this sample,  Supplier user mak1 is created with Supplier Number 10092.

    Just verify in the UserConstants.ATT_SUPPLIER  field, you should pass Supplier_Number instead of Supplier name.

    HashMap<Integer, String> supplierUser = new HashMap<>();
    supplierUser.put(UserConstants.ATT_GENERAL_INFO_USER_ID, “mak1”);
    supplierUser.put(UserConstants.ATT_LOGIN_PASSWORD, “agile123”);
    supplierUser.put(UserConstants.ATT_SUPPLIER, “10092”);

    IUser supUser = (IUser) m_session.createObject(UserConstants.CLASS_USER, supplierUser);

     

    Regards,

    Arif

    • 1182 views
    • 2 answers
    • 0 votes
  • Agile Angel Asked on September 12, 2019 in Product Collaboration.

    Hi Dorota,

    Depends on the count of LOVs. If it’s really huge list then i suggest writing a simple groovy script event. Personally tried it and it worked fine.

    You can create an event of Event-Type : Extended Tools Menu and in Groovy Event-handler you could write code as shown below:

    //The ListVals.addChild is where you specify your cascaded list-values in “|” separated format

    —————————————————————————-

    IAgileSession session = obj.getAgileSDKSession();
    IAdmin admin = session.getAdminInstance();
    IListLibrary listLib = admin.getListLibrary();
    IAdminList list = listLib.getAdminList(“CascadedFruitList“);
    IAgileList ListVals = list.getValues();

    ListVals.addChild(“Fruit|Guava”)
    ListVals.addChild(“Fruit|Apple”)
    ListVals.addChild(“Fruit|Mango|Alphonso”)

    list.setValues(ListVals);

    —————————————————————————-

    let me know if you get any issues in executing it.

     

    Regards,

    Arif

    This should work fine.

     

    • 1297 views
    • 3 answers
    • 0 votes