Transfer dictionary between interfaces

Hi All, 

 I have a requirement wherein I need to transfer one dictionary from child interface to parent interface on button click (Please note button is configured inside child interface)

Apart from saving the data into a rule input of type ANY TYPE, is there any other way to transfer a dictionary from child to parent?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Okay thanks !
    but any type looks insufficient to my case. 

    Here is my scenario:

    I've a button labelled 'Add New Data' in parent interface. Whenever i hit this button, it displays my child interface. On clicking 'Done' button in the child interface, brings the data to parent interface.

    Now when I click 'Add new data' button again and it calls the child interface for the second time (looped) , now when i hit 'Done', i need to append both dictionaries. 

    For this i've written below code in 'Done' button (child interface).

    a!buttonwidget(

    label:"Done",

    saveInto: 

    {

    if(rule!apn_isempty(ri!data),

    a!save( ri!data, local!data ),

    a!save(ri!data,append(ri!data,local!data)

    )

    }

    )

    Appending two ANY TYPE value fails . Could you please suggest some other way to do this?

  • 0
    Certified Senior Developer
    in reply to arunramanathtm

    We cannot append to a "Dictionary".

    But we can append to a type "List Of Dictionary"

  • 0
    Appian Employee
    in reply to best

    Correct you cannot append a dictionary to a dictionary. You need ri!data to be a List of Dictionary. You should be able to replace your if statement with just:

     

    a!save(ri!data,append(ri!data,local!data)

    This will create a list of dictionary on the first save and then append new values to that list on subsequent saves.