Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Input form throwing error while trying to create/view object

Avatar

Level 7

Hi,

I am trying to add 2 text fields onto form. These 2 fields are Foreign Keys in the schema which are referring to respective fields (Composite Primary Key) in linked schema.

However, when I am trying to view the object I am getting following error on the Input Form

Ssb_94_0-1652025263596.png

My understanding is it is looking for matching value in linked schema, since it is not found it is throwing error. However in our case values shall be input by the user in the form so default it would be empty.

Is there any way we can make this link optional as in not to validate and throw error. Your thoughts!

Thanks,

SSB

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Ssb_94 , can you show us the link in the schema ?

The type or cardinality can have an incidence on the way that Campaign try to get the linked element.

 

Also, what have you put in the input xpath value for thoose 2 fileds ? If you try to put the xpath with the external element path (<input xpath="[Campaign/@campaignName]"/>) it won't work, you should use the "local key" path (<input xpath="@deliveryName"/>).

If you need to display informations from the external table, you can add a conditional container to display them (<container type="visibleGroup" visibleIf="[@deliveryName]!='' and [@deliveryWave]!='' ">. But if the user enter bad values (inexistant into the cusCampaign table) it will throw the same error.

 

A better way should be to replace the 2 "manual" fields with a simple and direct field to the Campaign element itself : <input xpath="Campaign"/> don't you think ?

 

Cedric

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @Ssb_94 , can you show us the link in the schema ?

The type or cardinality can have an incidence on the way that Campaign try to get the linked element.

 

Also, what have you put in the input xpath value for thoose 2 fileds ? If you try to put the xpath with the external element path (<input xpath="[Campaign/@campaignName]"/>) it won't work, you should use the "local key" path (<input xpath="@deliveryName"/>).

If you need to display informations from the external table, you can add a conditional container to display them (<container type="visibleGroup" visibleIf="[@deliveryName]!='' and [@deliveryWave]!='' ">. But if the user enter bad values (inexistant into the cusCampaign table) it will throw the same error.

 

A better way should be to replace the 2 "manual" fields with a simple and direct field to the Campaign element itself : <input xpath="Campaign"/> don't you think ?

 

Cedric

Avatar

Level 7

Thank you @CedricRey 

We corrected the linking at our end and now issue stands solved

Avatar

Administrator

Hi @Ssb_94,

Was the given solution helpful to resolve your query or do you still need more help here? Do let us know.

Thanks!



Sukrity Wadhwa