27
Views
17
Comments
Solved
Need some guidance on Dynamic Inputs in Form
Application Type
Reactive

Hello Team,

I got stuck in the situation where I have to create a dynamic input table for Criteria and Score. But the condition is whenever a user inserts score greater than 10 there should be a popup where user can enter the Sub Criteria (Segregate the score as per the Criteria Score). Also it should allow user to modify the Criteria and Sub Criteria at a same time. For now I want to store it in local variable and then on Final hit of Submit I want to create the CRUD operation with Entity.

Is there any approach to achieve this?

Please find the Attached OML as reference.

Thanks

Rupesh

Rupesh.oml
Solution

Kindly find attached OML.

Actually I did some changes by removing FinalCriteria list as its same type and same use of Ctiteria_List and changed logic to use Ctiteria_List into saving and appending new items.

Please check OML and if you have any questions let me know. 

Rupesh_Modified_V2.oml

Hi Rupesh,

I have corrected your OML, Please check and let me know if it helps.

Thanks.



RupeshSolu.oml

Sure Jozy, Let me check.

Thanks

Hi Jozy, I have checked with your OML as well, But the Newly created Criteria not getting stored into the Entity. Please find attached screenshots for the reference.

Thanks

Rupesh 

Jozy_Sohail_Two.png
Jozy_Sohail_One.png
RupeshSolu1.oml

Hi Rupesh,

I reviewed your code and found two issues.

First one into Criteria structure you should use SubCriteria as list not as item as Criteria may have many SubCriteria 

The second one while you appending data to FinalCriteria you are using Criteria_List.Current which every time will retrieve first element of the list so all SubCriterias will be add to first criteria only so I added one more local variable CriteriaScore which will set its value with name when click Add Sub Criteria link

Kindly find attached OML with modifications

Rupesh_Modified.oml

Sure Mostafa, Let me check. 

Thanks for the Prompt response.

Hi Mostafa,

I have tried with your modified OML. Its working fine but it is appending the Criteria One after every new record. Not sure how that can be resolved. Do you have any suggestion on that? Please find the attached Screenshots as a reference.

Mostafa_One.png
Mostafa_Two.png
Solution

Kindly find attached OML.

Actually I did some changes by removing FinalCriteria list as its same type and same use of Ctiteria_List and changed logic to use Ctiteria_List into saving and appending new items.

Please check OML and if you have any questions let me know. 

Rupesh_Modified_V2.oml

Hello Mostafa,

Yes this OML is working as per the condition now. Just a little change I am looking for is, Can we provide edit for the same table as well? So that user can do the changes in existing table only. And then hit on Final Submit?

If it is yes will you please suggest what changes needs to be done?

Thanks 

Rupesh

Yes, you can do that by fetching data when you open screen exactly as Table screen that you are using to display data then start adding new records by clicking add or edit existing records 

Yes That can be done, But I was thinking to make all the CRUD operation in same screen before final submit. This is also doable right?


yes, doable but I want to understand the scenario you want to implement more.

Do you want to fill data into criteria table and open pop up for filling sub criteria and after closing pop up you want to open it again and update data?

By the way for criteria table, you are using textboxes so it editable

Yes, your understanding is right. For Criteria Table Textboxes are editable but once we append the record in a final list (local variable) then how we can update it? 

Hi Rupesh,

Sorry for late reply. Kindly find attached OML.

Please check changes I did into action "AddSubcriteriaOnClick". I just checked if criteria already has sub criteria I assigned it to SubCriteria_List before opening popup  

Rupesh_Modified_V3.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.