editable grid

I have a CDT declared as ri!input.

The expectation is to create a section with text field which would have 1 value from cdt.(user value as per below image)

The rest of values of the cdt is gotten via the grid layout.(countries, home country)

I face an issue when i update a value in the text field , automatically a row gets added in the grid row layout as highlighted below.

As one value is procured in the text field it expects value in the grid also to be populated.

please let me know how this can be fixed as the text value is required field not the grid layout would be mandatory

As this row is automatically added it interrupts the validations. 

I have tried to save the value in the ri variable in child form and dealt with local variable in parent form but no luck. Also the value when got from the local does not display in subforms in PMs

The ask is if the user field is updated and if no values in the grid then the user value should be added to cdt but should not display any empty column below

kindly assist

If not how to hide this empty row as it clashes with header cells when i apply at component level

  Discussion posts and replies are publicly visible

Parents
  • I don't know why you're using an editable grid to collect single field values for a single CDT.  It can work of course, but the setup is more complicated, and it's one of those things where if you're experienced enough to bother trying, you'd generally be able to troubleshoot yourself too.  Have you tried with standard Text Fields for these instead of a single-row Editable Grid?

    Also in such a use case, of course you also wouldn't have the "add employee" link, since your Rule Input CDT is presumably singlular, and i'm not sure what you're doing with empty rows popping in and out.  The single screenshot you've shared isn't really enough to discern what the cause is, or even what the issue you're experiencing really is.  If you still need help on this and you could provide a code snippet, and a few more screenshots of context (the rule input configurations, the error state, etc), that might get us somewhere.

Reply
  • I don't know why you're using an editable grid to collect single field values for a single CDT.  It can work of course, but the setup is more complicated, and it's one of those things where if you're experienced enough to bother trying, you'd generally be able to troubleshoot yourself too.  Have you tried with standard Text Fields for these instead of a single-row Editable Grid?

    Also in such a use case, of course you also wouldn't have the "add employee" link, since your Rule Input CDT is presumably singlular, and i'm not sure what you're doing with empty rows popping in and out.  The single screenshot you've shared isn't really enough to discern what the cause is, or even what the issue you're experiencing really is.  If you still need help on this and you could provide a code snippet, and a few more screenshots of context (the rule input configurations, the error state, etc), that might get us somewhere.

Children
No Data