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

  • Hi viveku0001,

    The values you modified are not saving in respective fields, please check your saveInto parameter configuration in grid.
  • 0
    Certified Associate Developer
    in reply to Swapna Chella
    The saveinto parameter is perfectly working. The issue happens when user inserts values into multiple fields in a quick time i.e lets say we have three dropdown fields displayed at a time, When I select value from first dropdown then it says working at the top, In between if i select values in other dropdown at that time their values wiped out and If I wait till the working message went away then it perfectly saves the value
  • 0
    Certified Senior Developer

    it seems your code is working fine as it save the value if you let it finish.
    you just need to optimize the code so it takes less time to save value and don't show "working" for long time.

    if you can share the code that will be helpful to understand.

  • 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