Issues with MultiArray CDT

Certified Associate Developer

Hello All,

 

We are receiving a CDT and based on that we need to create a grid that can allow users to add rows. Now my CDT structure is like below

 

CDT : {Label,Value,InputType}

Where label defines the header to be displayed and InputType is an integer value which tells about a specific input type to be selected like textfield,paragraph field,user picker and so on.

Suppose I received below cdt

 

{Label:"NumberOfWords",

Value:"",

InputType:1

}

 

Now, As we need to give the facility to add new rows, I took another cdt having two fields. Namely

GroupNumber,

Information : {Array of type CDT1}

So after receiving the cdt I transforming the contents into above cdt and accordingly displaying the rows. Everything is working fine but when user enters values into multiple fields at a quick time then those values wipped out. Can someone please tell me what should be the solution here?

  Discussion posts and replies are publicly visible

Parents
  • Hi vivek,
    I guess you have issues with save into, are you trying to save multiple fields into same variable? or are you tring to save into all the fields for evry field?
    Please share your code if you can.
    Thanks,
    Yeswanth.
  • 0
    Certified Associate Developer
    in reply to yeswanththiyarir
    Hi Yeswanth,

    You got it right, I'm saving values in multiple fields for a same variable. As the code exists in multiple files, It not possible for me to share everything here but for the shake of understanding, Let me try to explain my existing design

    So we have a CDT having two fields.. Namely{Index,Information}

    Index field holds the index number or we can say the row number and information field is an array holding the values for each row. Now suppose I have three columns for the grid then information field contains three items with key-Value pair. Now out of that three fields one field is static and it needs to auto populate the date and time whenever user stars inserting their inputs in any of the available fields, So we are making a logic under saveInto for this field everytime to check if it is null or already contains a value, If it is null then we are storing current date and time otherwise keeping that as it is. Initially I had doubts that this field might be causing the issue but the result remains same even when I commented the logic for this field
Reply
  • 0
    Certified Associate Developer
    in reply to yeswanththiyarir
    Hi Yeswanth,

    You got it right, I'm saving values in multiple fields for a same variable. As the code exists in multiple files, It not possible for me to share everything here but for the shake of understanding, Let me try to explain my existing design

    So we have a CDT having two fields.. Namely{Index,Information}

    Index field holds the index number or we can say the row number and information field is an array holding the values for each row. Now suppose I have three columns for the grid then information field contains three items with key-Value pair. Now out of that three fields one field is static and it needs to auto populate the date and time whenever user stars inserting their inputs in any of the available fields, So we are making a logic under saveInto for this field everytime to check if it is null or already contains a value, If it is null then we are storing current date and time otherwise keeping that as it is. Initially I had doubts that this field might be causing the issue but the result remains same even when I commented the logic for this field
Children
No Data