Menu

How to make some string fields with unique value

2022-11-25
2022-12-02
  • Nikola Milanov

    Nikola Milanov - 2022-11-25

    Hi,
    I try to make some string fields unique describe in this page: Here
    I'm trying to make uniqueness to these fields: Device Name, Serial number, Brand and Model of all Physical devices.
    This is the code I use (this is only for 2 fields - Name and Serial number):

            <classes>
                    <class id="PhysicalDevice" _delta="must_exist">
            <properties>
            <uniqueness_rules>
              <rule id="functionalci_name" _delta="define">
                <attributes>
                  <attribute id="name"/>
                </attributes>
              </rule>
              <rule id="phisicaldevice_serialnumber" _delta="define">
                <attributes>
                  <attribute id="serialnumber"/>
                </attributes>
              </rule>
            </uniqueness_rules>
          </properties>
    

    but when I try to update code via Toolkit it doesn't do anything.
    What I did wrong or am I miss something?

    Thanks,
    Nikola

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2022-11-25

    Although incomplete, the start seems okay?

     
  • Nikola Milanov

    Nikola Milanov - 2022-11-28

    Hi Jeffrey,
    Should I put and lines in dictionary section?

    Cheers

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2022-11-28

    Perhaps share your entire code.

     
  • Nikola Milanov

    Nikola Milanov - 2022-12-02

    Hi Jeffrey,
    I think I found my mistake. I'll try and if I have some more questions, I'll write again.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.