Forum - store for settings

  • This topic has 4 replies, 2 voices, and was last updated 1 week, 3 days ago by 49KOBV_FUB.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #67874
    49KOBV_FUB
    Participant

    I changed the settings in settings.ts, adding a new value and deleting an old one, but this change has no effect on the existing settings structure. Any idea what to do here?

    -Christoph

    #67892
    Josh Weisman
    Keymaster

    Hi Christoph. Thanks for your question. Have you checked out the settings service tutorial? There are some code samples there that might be helpful.
    https://developers.exlibrisgroup.com/cloudapps/tutorials/settings/

    If it still doesn’t work for you let us know.

    #67952
    49KOBV_FUB
    Participant

    Hi Josh,
    I use the code samples you mentioned obove. It works fine with the initial setting values in ./models/settings.ts. Changes in this class like adding a new value has no effect.

    -Christoph

    #67960
    Josh Weisman
    Keymaster

    After you add new members to the Settings class, you should call the remove() method in the SettingsService to reset the saved value. Then the settings will be initialized as a new Settings class.

    There are a number of approaches to how to changes to the settings contents after your app has been released and settings need to be updated/upgraded. For example, you could add values to the value or FormGroup returned from the SettingsService (see here for example), or you could create your own helper method which creates the FormGroup and adds default values as necessary (see this for example).

    Hope this helps. Let us know how it goes.

    #67963
    49KOBV_FUB
    Participant

    Hi Josh,
    I think the problem is solved. I have to go to the display the app is concerning to, in my case to a PO-line, then the settings are changed as defined in ./models/setting.ts.

    Thanks!
    -Christoph

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.