0 votes

Hi all!

I had to create a new entity (THEMATICS) and i need to use its values to fill a multivalue.
This multivalue is a field of Documents that allows users to choose some thematics.
To fill it i need a custom field and i found this post :
https://overflow.efficy.com/?qa=2468/custom-options-in-a-multi-value-field&show=2468#q2468

so i implemented my field like this :
FormFieldsEditCustom.txt:

field.THEMATICS {[
    <%GetEdit('$FIELD$',
    data-ajax-url='dialog?_macro=MultiValue_DOCU_Thematics&_macrofile=MacroAjax&Key=<%RunScript(getMainDetail, detail=Them)%>',
    data-json='{<%GetField("$FIELD$", type="MULTIVALUE", json=T)%>}')
]}

MacroAjaxCustom.txt

MultiValue_DOCU_Thematics {[
<%RunQuery(id='getThematicEntries', store=10001, SQL='select Them.K_THEMATIC, Them.NAME from THEMATICS Them order by NAME desc')%>
<%GetDataGrid(query='getThematicEntries', count=-1, norecords='', nolinefeed=T,
    templatetext=|[<#repeat>
            {
                 "id":<#F=K_THEMATIC;nospace=T>
                ,"text":"<#F=NAME;jsontext=T;nospace=T>"
            }<#S=;SEPARATOR=,>
        </#repeat>]|
    )%>
]}

The multivalue field is "works" : when i want to look a Document that have thematics this error is thrown :

ID: ENTT-1515

Message: LookupTableManager
Cannot fetch Lookup Table Values on table "DOCUMENTS.F_THEMATICS"

Commentaire:

Details: Application Server Error
(ENTT-1513) LookupTableManager
Cannot fetch Lookup Table Values on table "DOCUMENTS.FTHEMATICS"
(ENTT-1515) LookupTableManager
FieldName "0" not found in SYS
FIELDS

Secondly, why a button "Download" is display below ?
All tab (green buttons on the screens) display the same thing. I think it's the buttons of the next tab.. This error only appears when i define the field definition (THEMATICS instead of MULTIVALUE in Edit Document on Conficy)

Thanks a lot !

enter image description here

closed with the note: resolved
asked in Efficy/ Client side by (245 points)
closed by

1 Answer

0 votes

Dear m.chalavon,

I think the issue is that your field is not pointing to your new entity but it is pointing to a lookup table. it is not a good idea to have a field pointing to an entity. the best would be to use the Detail links instead (le radio button at the right side of the Edit Window)

Best Regards,
Stéphane RONCIN

answered by (1.8k points)
1,173 questions
1,433 answers
1,726 comments
325 users