Creating Drop Down Menu Not Working | Community
Skip to main content
Level 2
June 2, 2023
Solved

Creating Drop Down Menu Not Working

  • June 2, 2023
  • 1 reply
  • 1112 views

Hi everyone !
I'm trying to create a dropdown menu in an input forms and I don't know why this doesn't work, knowing that I've created an enumeration in the DataSchema,

 

here's the code for the DataSchema :

<enumeration basetype="short" default="sh" name="scriptLanguage1"> <value label="Shell script" name="sh" value="0"/> <value label="DOS Batch" name="batch" value="1"/> <value label="Visual Basic script" name="vbs" value="2"/> <value label="Perl" name="perl" value="3"/> <value label="Python" name="python" value="4"/> <value label="Ruby" name="ruby" value="5"/> <value label="Other..." name="other" value="6"/> </enumeration>

And this is the attribute linked to this enumeration :

<attribute desc="Language" enum="scriptLanguage1" label="Language" name="sscript" type="short"/>

 

This is the attribute i put in the Input Forms :

<input label="The Scripts languages" xpath="sscript"/>

I also tried to change xpath="sscript" to xpath="@sscript" but still not working ,

 

Thank you in advance for your help.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

 

Hi @anasspir05 ,

Have you updated the database structure after creating 'sscript' attribute in schema?

If yes, are you looking for dropdown in input form's preview tab?

 

the scripts given by you is correct.

And in input form, it should be xpath="@sscript"

<input label="The Scripts languages" xpath="@sscript"/>

 

In preview tab of input form, you can't see the dropdown (it will be greyed out).

(Example you can open any out of box forms like nms:recipient, go to preview tab, and you can see dropdown will be greyed out)

 

 

To test the dropdown, create a navigation hierarchy for your schema, and check the input form function. drop down will work with your script. But make sure you modify xpath="@sscript" in input form.

 

Regards,

ParthaSarathy

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
June 2, 2023

 

Hi @anasspir05 ,

Have you updated the database structure after creating 'sscript' attribute in schema?

If yes, are you looking for dropdown in input form's preview tab?

 

the scripts given by you is correct.

And in input form, it should be xpath="@sscript"

<input label="The Scripts languages" xpath="@sscript"/>

 

In preview tab of input form, you can't see the dropdown (it will be greyed out).

(Example you can open any out of box forms like nms:recipient, go to preview tab, and you can see dropdown will be greyed out)

 

 

To test the dropdown, create a navigation hierarchy for your schema, and check the input form function. drop down will work with your script. But make sure you modify xpath="@sscript" in input form.

 

Regards,

ParthaSarathy

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
Level 2
June 2, 2023

Hi @parthasarathy ,

Thank you for your reply, otherwise yes I have updated the database but what I want is that at least I can see the result in the input forms and then I could create the navigation hierarchy but I don't even have a preview of the dropdown menu in gray.

ParthaSarathy
Community Advisor
Community Advisor
June 2, 2023

@anasspir05 , have you created enumeration above <element label="schema label" name="schemaName"... tag?

I have tried your script in sandbox and its working fine.

Schema: name - test:schemaName --- <srcSchema ......... label="Schema Name" name="schemaName" namespace="test" xtkschema="xtk:srcSchema"> <enumeration basetype="short" default="sh" name="scriptLanguage1"> <value label="Shell script" name="sh" value="0"/> <value label="DOS Batch" name="batch" value="1"/> <value label="Visual Basic script" name="vbs" value="2"/> <value label="Perl" name="perl" value="3"/> <value label="Python" name="python" value="4"/> <value label="Ruby" name="ruby" value="5"/> <value label="Other..." name="other" value="6"/> </enumeration> <element label="Test" name="test" autopk="true"> <attribute desc="Language" enum="scriptLanguage1" label="Language" name="sscript" type="short"/> </element> </srcSchema> // UPDATE THE DATABASE STRUCTURE // DISCONNECT & RECONNECT CAMPAIGN Input form: name: test:schemaName <form ............. name="schemaName" namespace="test" xtkschema="xtk:form"> <input label="The Scripts languages" xpath="@sscript"/> </form> //SAVE //PREVIEW NOW

 

Output:

 

 

After creating navigation hierarchy:

If its not working in your current schema, try creating a new schema, and configure the above script alone and give a try.

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups