Expand my Community achievements bar.

Input Form - Populate Dropdown

Avatar

Level 5

Hi Team,

 

I have a custom schema, where one of the fields will have value from a lookup table. I don't want to link the lookup table/schema to the above custom schema.

 

While creating an input form against that field, I want to show the marketing user, the list from the Lookup table so that he can multiselect those from that lookup table.

 

For ex: I have a tblProductSelected(Id, ProductSelected), tblProduct(id, ProductCode, ProductName)

 

For the Input form of tblProductSelected, for the ProductSelected field, I want show a List of Product Name for the user to select (multiselect), once selected the codes, should be saved in a CSV format.

 

Need your help

 

Regards,

Dipendu 

 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

12 Replies

Avatar

Level 5

Hi @Marcel_Szimonisz,

 

If my understanding is correct, that blog talks about WebApp. I am looking for Input Forms within ACC. 

Apologies, If I wasn't clear on my ask

 

Regards

DG

Avatar

Community Advisor

Hello @dipendu_g ,

sorry as well.
If in the schema the field is enum then in form it should be picked up automatically.
Take a look at the documentation.

 

Marcel

Avatar

Level 5

Hi @Marcel_Szimonisz,

 

In the schema the column is string. Its not an enum.

 

Regards,

DG

Avatar

Community Advisor

Hello @dipendu_g 

Can you make it enum? If not then you need to hardcode those values manually

 

Marcel

Avatar

Level 5

Hi @Marcel_Szimonisz

 

Thanks for your reply,

As the column's value is dependent on another :Lookup Table, enum doesn't seem to be a possibility. If you look at my example table above the implementation is very similar. 

 

Regards,

DG

Avatar

Level 5

Hi @Marcel_Szimonisz,

 

Thanks a lot, let me check that out.

 

Just another question :

 

Is it possible to call a function after the form is saved ?

I understand that <leave> kinds of work before the changes are saved onto the schema, is there any afterSave kind of hook that can be intercepted, and either a database method can be called. ?

 

Regards,

DG 

Avatar

Community Advisor

Hello yes leave is triggered when you click on save. You can add validations etc.. just put this leave before end of form. Here you can see example.
It was used as my first version for workflow lock

  <leave>
    <if expr="@lockedBy &gt; 0">
        <soapCall name="CanBeModified" service="xtk:workflow">
        	<param exprIn="@id" name="id" type="int"/>
      	</soapCall>
      <!--
		did not work :)
		<check expr="@lockedBy != [currentOperator/@id]">
        <error>The workflow is locked!</error>
      </check>
	-->
    </if>
  </leave>

 

Avatar

Level 5

Hi @Marcel_Szimonisz ,

 

Actually what I am looking for is to trigger either a Workflow automatically or Call a SOAP method, after the save has completed. I need to process the saved changes that the Marketing User will make using the Input forms. 

 

Regards,

DG

Avatar

Community Advisor

You can use the <leave>, I guess you will need to pass the parameters from form to the SOAP function then

 

Marcel

Avatar

Level 5

Actually in the Business Logic complete regeneration based of the data happens, based on the available data at a particular instance, hence I need the data to be saved into the Schema/Table before I can use the SOAP call.