Aller au contenu principal

I want to know is there any API from i can get any variable declare in sitestore is exist or not ?

Commentaires

3 commentaires

  • Zendesk API User
    Author: C_Klingbeil - 12/30/2013 8:44

    Here you can find an example for modifying sitestore variables:

    http://www.e-spirit.com/odfs42/access/?examples/de/espirit/firstspirit/access/store/sitestore/SiteStoreFolderVariablesExample.html

    In your specific problem I would use the GomEditorProvider and .findEditor() like that:

    siteStoreRoot = context.getProject().getUserService().getStore(Store.Type.SITESTORE,true);

    gomFormProvider = siteStoreRoot.getFormData().getForm();

    formField = gomFormProvider.findEditor("ssManualMandator");

    If ssManualMandator exists your return will be a GomFormElement. Otherwise it will return null. You can test it like that:

    siteStoreRoot = context.getProject().getUserService().getStore(Store.Type.SITESTORE,true);

    gomFormProvider = siteStoreRoot.getFormData().getForm();

    if (gomFormProvider.findEditor("ssManualMandator") != null) {

         return true;

    } else {

         return false;

    }

    Hope that will do for your skript.

    0
  • Zendesk API User
    Author: C_Klingbeil - 12/30/2013 10:14

    Example link was a link to FirstSpirit 4.2 API. The example in FirstSpirit 5.0 API is linked here:

    http://www.e-spirit.com/odfs50/access/?examples/de/espirit/firstspirit/access/store/sitestore/SiteStoreFolderVariablesExample.html

    0
  • Zendesk API User
    Author: MichaelaReydt - 1/14/2014 10:36

    Hello,   

    do you need further help or did Carola's reply already help you? If so, it would be great if you marked

    her reply as "correct answer" so that other community users find the solution easily. If you have

    already found a solution by yourself, it would be very kind of you, if you posted it here.   

    Best regards 

    Michaela

    0

Vous devez vous connecter pour laisser un commentaire.