Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Input Form - <leave> xml tag is not working

Avatar

Avatar
Validate 1
Level 1
andreac50638695
Level 1

Likes

2 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Give Back
Ignite 1
Boost 1
View profile

Avatar
Validate 1
Level 1
andreac50638695
Level 1

Likes

2 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Give Back
Ignite 1
Boost 1
View profile
andreac50638695
Level 1

08-05-2017

Hi All,

We created the following Input Form based in a custom Schema.

Form is correctly displayed, but when we try to display an error message using the tag <leave> in case the parameter "@scriptName" is empty, no error is displayed and the record is created also if scriptName value is empty.

Is there something wrong in the following xml?

<form _cs="Script (amp)" created="2017-05-03 10:12:24.149Z" createdBy-id="319510"

      entitySchema="xtk:form" img="xtk:form.png" label="Script" lastModified="2017-05-08 09:12:52.812Z"
      md5="36EB2AAA88A5A02EA5A042DB0825630A" modifiedBy-id="319510" name="script"
      namespace="amp" xtkschema="xtk:form">
  <createdBy _cs="Administrator (acorsi)"/>
  <container label="Script" name="script">
    <input required="true" xpath="@scriptName"/>
    <input xpath="@scriptDesc"/>
    <static colspan="2" label="Description" type="separator"/>
    <input nolabel="true" xpath="@scriptContent"/>
  </container>
  <leave>
    <check expr="@scriptName=''">
      <error>The name is not specified.</error>
    </check>
  </leave>
</form>

Thanks in advance for your support.

Andrea

 

Below also the "script" schema definition.

<srcSchema _cs="Script (amp)" created="2017-05-03 09:50:46.015Z" createdBy-id="0"
           entitySchema="xtk:srcSchema" img="xtk:schema.png" label="Script" lastModified="2017-05-04 10:45:34.352Z"
           mappingType="sql" md5="4FE18B7EA1A491A2DDE3F91EE2D40068" modifiedBy-id="0"
           name="script" namespace="amp" xtkschema="xtk:srcSchema">
  <createdBy _cs="Administrator (acorsi)"/>
  <modifiedBy _cs="Administrator (acorsi)"/>
  <element autopk="true" label="Script" labelSingular="Script" name="script">
    <key name="scriptName">
      <keyfield xpath="@scriptName"/>
    </key>
    <attribute label="Script Name" name="scriptName" required="true" type="string"/>
    <attribute label="Script Description" name="scriptDesc" type="string"/>
    <attribute label="Script Content" name="scriptContent" type="html"/>
    <attribute default="GetDate()" desc="Creation Date" label="Creation Date" name="created"
               type="datetime"/>
    <attribute label="Exported to CC" name="exportedCCFlg" type="boolean"/>

  </element>
</srcSchema>

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile
Amit_Kumar
MVP

09-05-2017

Well! you are almost there use the following modification and this will work for you.

<leave> <check expr="@scriptName != ''"> <error>You must populate the 'Test' field!</error> </check> </leave>

Read more adobe form structure elements here.

Regards,

Amit

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 1
andreac50638695
Level 1

Likes

2 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Give Back
Ignite 1
Boost 1
View profile

Avatar
Validate 1
Level 1
andreac50638695
Level 1

Likes

2 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Give Back
Ignite 1
Boost 1
View profile
andreac50638695
Level 1

23-05-2017

It Works!

Thank you very much 🙂