Siebel > Empty Column name is being selected when clicked on Button with CopyRecord method - siebel

I am trying to copy a record in Siebel and I used venilla method CopyRecord. I placed a button on the applet and called CopyRecord method behind it. On clicking the method I am getting this error on UI:
SBL-DBC-00105: An error has occurred executing a Sql statement.
Please continue or ask your systems administrator to check your application configuration if the problem persists.
I checked in logs and here is the details:
DBCLog DBCLogError 1 000000025a2722fc:0 2017-12-06 03:31:01 OCIStmtExecute: SELECT
T19.CONFLICT_ID,
T19.LAST_UPD,
T19.CREATED,
T19.LAST_UPD_BY,
T19.CREATED_BY,
T19.MODIFICATION_NUM,
T19.ROW_ID,
T19.ROW_ID,
T19.LAST_UPD,
T19.,
T19.APPEALED_FLG,
T19.PS_APPL_ID,
T19.APPR_TEMP_ID,
T19.EVAL_ASSESS_ID,
T19.ASGN_USR_EXCLD_FLG,
T19.AUDIT_EMP_ID,
T19.X_AUDIT_SERIAL_NUM,
T16.X_CPC,
T19.CASE_NUM,
T16.ATTRIB_44,
T19.SERIAL_NUM,
T16.ATTRIB_01,
T19.CATEGORY_TYPE_CD,
T19.CITY,
T19.CLASS_CD,
T19.CLOSED_DT,
T16.ATTRIB_42,
T16.ATTRIB_47,
T16.ATTRIB_45,
T19.COUNTRY,
T16.ATTRIB_44,
T19.CASE_DT,
T16.ATTRIB_07,
T19.DESC_TEXT,
T19.X_REFER_TO_PROSECUTION_FLG,
T19.X_ASSIGN_AUTO_MANUAL,
T16.ATTRIB_04,
T19.X_REHAB_COURT_PROCEEDING_FLAG,
T16.ATTRIB_09,
T19.X_APPLICANT_ID,
T19.X_CASE_CHARGES,
T19.X_COURT_SESSION_DT,
T19.X_COURT_SESSION_DT,
T7.OCCUR_DT,
T19.X_CRNT_SESSN_ID,
T19.X_DIVISION_NAME,
T10.POSTN_ID,
T19.X_JOINCASE_FLG,
T19.X_JOINCASE_ID,
T16.ATTRIB_26,
T19.,
T19.X_OLD_SERIAL_NUM,
T19.X_ON_BEHALF_ID,
T19.X_PANEL_ID,
T13.NAME,
T19.X_PANEL_SCHED_ID,
T8.POSTN_ID,
T19.X_OFFENSE_ID,
T16.X_POLICE_DIVISION,
T19.X_POLICE_OTHERS,
T4.POSTN_TYPE_CD,
T16.X_REHAB_ARCHIVE_REASON,
T16.X_REHAB_DESCRIPTION,
T16.X_DATE_1,
T19.X_ROOT_ROW_ID,
T19.X_SR_ID,
T16.X_REHAB_NOTES,
T15.OCCUR_DT,
T19.X_CLOB_02,
T19.ORG_GROUP_ID,
T19.CHANGED_FLG,
T19.X_CASE_NAME,
T16.X_COURTHOUSE,
T16.X_DISPOSITION,
T16.X_DISTRICT_NUM,
T16.X_INTERPRETER,
T16.X_JUDGE,
T16.X_JURISDICTION,
T16.X_PROSECUTOR,
T16.X_STATUES,
T19.X_FILING_APPEAL_DATE,
T19.TYPE_CD,
T19.X_BUNDLE_ID,
T19.X_CM_TYPE,
T19.X_CASE_DATE,
T19.X_PARTY_TYPE,
T16.CATEGORY_CODE,
T19.X_COMPLEXITY,
T19.X_CONVICTED,
T19.X_CONVICTED_ID,
T19.X_COPY_APPLY_DATE,
T19.X_COPY_ISSUANCE_DATE,
T19.X_COPY_JUDGMENT_DT,
T19.X_COURT_FEE_VALUE,
T19.X_DAYS_APPLICABLE,
T16.ATTRIB_24,
T19.LOCAL_SEQ_NUM,
T19.X_DIARY_DATE,
T19.X_DIARY_NUM,
T16.X_DISABLED_FLAG,
T19.X_DISTRICT,
T19.X_JUDGE_ID,
T19.X_FIR_NUM,
T19.X_FIR_REGISTRATION_DT,
T16.X_FAST_TRACK,
T19.X_FEE_APPLICABLE,
T19.X_FEE_TO_PAY,
T16.X_FEMALE_FLAG,
T16.X_GOVT_OFFICIAL,
T19.X_IS_APPEAL,
T19.X_IS_REVISION,
T19.X_JUDGE_DESIGNATION,
T19.X_JUDGE_NAME_URDU,
T19.X_JUDGEMENT_DT,
T16.X_JUVENILE_FLAG,
T19.X_LEGAL_TIME_ELASPED,
T19.X_COUNTY,
T19.X_OTHER_CATEGORY,
T16.X_OVERSEAS,
T14.SERIAL_NUM,
T14.X_SRL_NUMBER,
T14.X_CASE_NAME,
T14.X_SRL_NUMBER,
T14.STATUS_CD,
T19.X_QUEUE_NUMBER,
T16.X_RAPE_CASE,
T19.X_REASON_OF_URGENCY,
T19.X_REVIEW_FLG,
T16.X_SENIOR_CITIZEN_FLAG,
T19.X_SPECIAL_TAG,
T16.X_STAY,
T19.X_SUB_CATEGORY,
T19.X_SUBJECT_OF_CASE,
T19.X_YEAR,
T16.TIME_ELAPSED,
T19.X_TODAY_FLG,
T16.ATTRIB_03,
T19.X_WINDING_UP_CLOSURE,
T19.X_REF_NUMBER,
T19.MSTR_CASE_ID,
T19.NAME,
T16.ATTRIB_25,
T16.ATTRIB_06,
T16.X_ORG_UNIT,
T16.ATTRIB_07,
T6.OWNER_PER_ID,
T16.ATTRIB_41,
T19.PAR_CASE_ID,
T16.ATTRIB_46,
T16.ATTRIB_37,
T19.X_CLOB_01,
T19.PR_AGENCY_ID,
T19.PR_REP_DNRM_FLG,
T19.PR_REP_MANL_FLG,
T19.PR_REP_SYS_FLG,
T19.PR_SGROUP_ID,
T19.BU_ID,
T19.PR_PRTNR_ID,
T19.PR_POSTN_ID,
T19.PR_PROD_INT_ID,
T19.PR_SUSPCT_ID,
T16.ATTRIB_39,
T19.ASGN_DT,
T16.X_ATTRIB_DSC_03,
T16.X_RECVD_FROM_ID,
T19.REWARD_AMT,
T19.REWARD_CURCY_CD,
T19.REWARD_EXCH_DATE,
T19.X_SRL_NUMBER,
T19.X_SERIAL_
ObjMgrLog Error 1 000000025a2722fc:0 2017-12-06 03:31:01 (oracon.cpp (3899)) SBL-DBC-00105: An error has occurred executing a Sql statement.
Please continue or ask your systems administrator to check your application configuration if the problem persists.
SQLParseAndExecute Execute 5 000000025a2722fc:0 2017-12-06 03:31:01 ORA-01747: invalid user.table.column, table.column, or column specification
In the spool, the logs are:
SELECT
T19.CONFLICT_ID,
T19.LAST_UPD,
T19.CREATED,
T19.LAST_UPD_BY,
T19.CREATED_BY,
T19.MODIFICATION_NUM,
T19.ROW_ID,
T19.ROW_ID,
T19.LAST_UPD,
T19.,
T19.APPEALED_FLG,
T19.PS_APPL_ID,
T19.APPR_TEMP_ID,
T19.EVAL_ASSESS_ID,
T19.ASGN_USR_EXCLD_FLG,
T19.AUDIT_EMP_ID,
T19.X_AUDIT_SERIAL_NUM,
T16.X_CPC,
T19.CASE_NUM,
T16.ATTRIB_44,
T19.SERIAL_NUM,
T16.ATTRIB_01,
T19.CATEGORY_TYPE_CD,
T19.CITY,
T19.CLASS_CD,
T19.CLOSED_DT,
T16.ATTRIB_42,
T16.ATTRIB_47,
T16.ATTRIB_45,
T19.COUNTRY,
T16.ATTRIB_44,
T19.CASE_DT,
T16.ATTRIB_07,
T19.DESC_TEXT,
T19.X_REFER_TO_PROSECUTION_FLG,
T19.X_ASSIGN_AUTO_MANUAL,
T16.ATTRIB_04,
T19.X_REHAB_COURT_PROCEEDING_FLAG,
T16.ATTRIB_09,
T19.X_APPLICANT_ID,
T19.X_CASE_CHARGES,
T19.X_COURT_SESSION_DT,
T19.X_COURT_SESSION_DT,
T7.OCCUR_DT,
T19.X_CRNT_SESSN_ID,
T19.X_DIVISION_NAME,
T10.POSTN_ID,
T19.X_JOINCASE_FLG,
T19.X_JOINCASE_ID,
T16.ATTRIB_26,
T19.,
T19.X_OLD_SERIAL_NUM,
T19.X_ON_BEHALF_ID,
T19.X_PANEL_ID,
T13.NAME,
T19.X_PANEL_SCHED_ID,
T8.POSTN_ID,
T19.X_OFFENSE_ID,
T16.X_POLICE_DIVISION,
T19.X_POLICE_OTHERS,
T4.POSTN_TYPE_CD,
T16.X_REHAB_ARCHIVE_REASON,
T16.X_REHAB_DESCRIPTION,
T16.X_DATE_1,
T19.X_ROOT_ROW_ID,
T19.X_SR_ID,
T16.X_REHAB_NOTES,
T15.OCCUR_DT,
T19.X_CLOB_02,
T19.ORG_GROUP_ID,
T19.CHANGED_FLG,
T19.X_CASE_NAME,
T16.X_COURTHOUSE,
T16.X_DISPOSITION,
T16.X_DISTRICT_NUM,
T16.X_INTERPRETER,
T16.X_JUDGE,
T16.X_JURISDICTION,
T16.X_PROSECUTOR,
T16.X_STATUES,
T19.X_FILING_APPEAL_DATE,
T19.TYPE_CD,
T19.X_BUNDLE_ID,
T19.X_CM_TYPE,
T19.X_CASE_DATE,
T19.X_PARTY_TYPE,
T16.CATEGORY_CODE,
T19.X_COMPLEXITY,
T19.X_CONVICTED,
T19.X_CONVICTED_ID,
T19.X_COPY_APPLY_DATE,
T19.X_COPY_ISSUANCE_DATE,
T19.X_COPY_JUDGMENT_DT,
T19.X_COURT_FEE_VALUE,
T19.X_DAYS_APPLICABLE,
T16.ATTRIB_24,
T19.LOCAL_SEQ_NUM,
T19.X_DIARY_DATE,
T19.X_DIARY_NUM,
T16.X_DISABLED_FLAG,
T19.X_DISTRICT,
T19.X_JUDGE_ID,
T19.X_FIR_NUM,
T19.X_FIR_REGISTRATION_DT,
T16.X_FAST_TRACK,
T19.X_FEE_APPLICABLE,
T19.X_FEE_TO_PAY,
T16.X_FEMALE_FLAG,
T16.X_GOVT_OFFICIAL,
T19.X_IS_APPEAL,
T19.X_IS_REVISION,
T19.X_JUDGE_DESIGNATION,
T19.X_JUDGE_NAME_URDU,
T19.X_JUDGEMENT_DT,
T16.X_JUVENILE_FLAG,
T19.X_LEGAL_TIME_ELASPED,
T19.X_COUNTY,
T19.X_OTHER_CATEGORY,
T16.X_OVERSEAS,
T14.SERIAL_NUM,
T14.X_SRL_NUMBER,
T14.X_CASE_NAME,
T14.X_SRL_NUMBER,
T14.STATUS_CD,
T19.X_QUEUE_NUMBER,
T16.X_RAPE_CASE,
T19.X_REASON_OF_URGENCY,
T19.X_REVIEW_FLG,
T16.X_SENIOR_CITIZEN_FLAG,
T19.X_SPECIAL_TAG,
T16.X_STAY,
T19.X_SUB_CATEGORY,
T19.X_SUBJECT_OF_CASE,
T19.X_YEAR,
T16.TIME_ELAPSED,
T19.X_TODAY_FLG,
T16.ATTRIB_03,
T19.X_WINDING_UP_CLOSURE,
T19.X_REF_NUMBER,
T19.MSTR_CASE_ID,
T19.NAME,
T16.ATTRIB_25,
T16.ATTRIB_06,
T16.X_ORG_UNIT,
T16.ATTRIB_07,
T6.OWNER_PER_ID,
T16.ATTRIB_41,
T19.PAR_CASE_ID,
T16.ATTRIB_46,
T16.ATTRIB_37,
T19.X_CLOB_01,
T19.PR_AGENCY_ID,
T19.PR_REP_DNRM_FLG,
T19.PR_REP_MANL_FLG,
T19.PR_REP_SYS_FLG,
T19.PR_SGROUP_ID,
T19.BU_ID,
T19.PR_PRTNR_ID,
T19.PR_POSTN_ID,
T19.PR_PROD_INT_ID,
T19.PR_SUSPCT_ID,
T16.ATTRIB_39,
T19.ASGN_DT,
T16.X_ATTRIB_DSC_03,
T16.X_RECVD_FROM_ID,
T19.REWARD_AMT,
T19.REWARD_CURCY_CD,
T19.REWARD_EXCH_DATE,
T19.X_SRL_NUMBER,
T19.X_SERIAL_ISSUANCE_DATE,
T19.STATE,
T19.STATUS_CD,
T19.STATUS_CD,
T19.SUB_STATUS_CD,
T16.ATTRIB_43,
T19.PR_SUBJECT_ID,
T19.SUBJECT_NAME,
T19.SUBJECT_PH_NUM,
T17.FST_NAME,
T17.LAST_NAME,
T19.TERRITORY_TYPE_CD,
T19.CRIME_TYPE_CD,
T19.THREAT_LVL_CD,
T19.CRIME_SUB_TYPE_CD,
T19.TYPE_CD,
T19.X_URGENT_CASE_FLG,
T19.X_VALUE_JURISDICTION,
T19.BU_ID,
T19.X_CASE_MODE,
T16.X_REHAB_TYPE,
T19.X_RELATIONSHIP,
T13.X_PANEL_TYPE,
T19.X_COURT_STAGE,
T19.PRIORITY_TYPE_CD,
T16.ATTRIB_05,
T16.ATTRIB_38,
T19.X_RECEIVING_METHOD,
T19.X_REHAB_STATUS,
T19.SOURCE_CD,
T19.STAGE_CD,
T19.SUB_TYPE_CD,
T5.ROW_ID,
T11.LOGIN,
T3.FST_NAME,
T3.SPOUSE_LAST_NAME,
T2.FST_NAME,
T2.SPOUSE_LAST_NAME,
T16.ROW_ID,
T16.PAR_ROW_ID,
T16.MODIFICATION_NUM,
T16.CREATED_BY,
T16.LAST_UPD_BY,
T16.CREATED,
T16.LAST_UPD,
T16.CONFLICT_ID,
T16.PAR_ROW_ID,
T12.ROW_ID,
T5.ROW_ID,
T18.ROW_ID,
T9.ROW_ID
FROM
SIEBEL.S_POSTN T1,
SIEBEL.S_CONTACT T2,
SIEBEL.S_CONTACT T3,
SIEBEL.S_POSTN T4,
SIEBEL.S_PARTY T5,
SIEBEL.S_CONTACT T6,
SIEBEL.S_INCIDENT T7,
SIEBEL.S_CASE_POSTN T8,
SIEBEL.S_PARTY T9,
SIEBEL.S_CASE_POSTN T10,
SIEBEL.S_USER T11,
SIEBEL.S_CASE_POSTN T12,
SIEBEL.S_PROJ T13,
SIEBEL.S_CASE T14,
SIEBEL.S_INCIDENT T15,
SIEBEL.S_CASE_X T16,
SIEBEL.S_CONTACT T17,
SIEBEL.S_PARTY T18,
SIEBEL.S_CASE T19
WHERE
T19.AUDIT_EMP_ID = T6.PAR_ROW_ID (+) AND
T19.X_CRNT_SESSN_ID = T7.ROW_ID (+) AND
T19.X_PANEL_ID = T13.ROW_ID (+) AND
T19.ROW_ID = T10.CASE_ID (+) AND T10.X_PANEL_ROLE (+) = 'Head of Bench' AND
T19.ROW_ID = T8.CASE_ID (+) AND T8.X_PANEL_ROLE (+) = 'Panel Secretary' AND
T19.PAR_CASE_ID = T14.ROW_ID (+) AND T19.PAR_CASE_ID = T14.ROW_ID (+) AND
T19.PR_POSTN_ID = T4.PAR_ROW_ID (+) AND
T19.ROW_ID = T15.X_CASE_ID (+) AND T15.X_STATUS_CD (+) = 'Scheduled' AND
T19.PR_SUBJECT_ID = T17.ROW_ID (+) AND
T19.ROW_ID = T16.PAR_ROW_ID (+) AND
T19.PR_POSTN_ID = T12.POSTN_ID AND T19.ROW_ID = T12.CASE_ID AND
T12.POSTN_ID = T5.ROW_ID AND
T12.POSTN_ID = T1.PAR_ROW_ID (+) AND
T1.PR_EMP_ID = T11.PAR_ROW_ID (+) AND
T19.X_ON_BEHALF_ID = T18.ROW_ID (+) AND
T19.X_ON_BEHALF_ID = T3.PAR_ROW_ID (+) AND
T19.X_APPLICANT_ID = T9.ROW_ID (+) AND
T19.X_APPLICANT_ID = T2.PAR_ROW_ID (+) AND
(T19.X_PARTY_TYPE = 'CM') AND
(T19.PAR_CASE_ID = '1-348TLP')
Now from above logs, the problem is T19., is being selected without a column name. I checked and all fields have proper columns. I am not sure how to debug it further.

I found the issue and here is how i did it.
I cloned the same BC disabled all disabled following one by one and kept testing:
Escripts
User properties
Multi-valued fields
Removed the duplicate fields mapping on the same column
Removed the fields with no column / calculated value at all
Inactivated all other fields which
After doing that i was able to use CopyRecord method.

Related

How I can zoom-in for a sankey plot in R-shiny?

I have been trying to create a R shiny dashboard including a sankey network. It is working without any problem, however some of the plots seem quite clutter due to high number of nodes and connections based on some input parameters. As an alternative solution, i am trying to implement zooming feature triggered by double click by the user, but I am getting an error of "unused element" by shiny.
The part of the ui code including double click is:
sankeyNetworkOutput("diagram",dblclick = "plot1_dblclick",
brush = brushOpts(id = "plot1_brush",resetOnNew = TRUE)
The server side code is:
output$diagram<- renderSankeyNetwork({
sankeyNetwork(Links = rv1()$links, Nodes = rv1()$nodes,
Source = "IDsource", Target = "IDtarget",
Value = "value", NodeID = "name",
iterations = 0, sinksRight=TRUE,
fontSize=13, nodePadding=20)
observeEvent(input$plot1_dblclick, {
brush <- input$plot1_brush
if (!is.null(brush)) {
ranges$x <- c(brush$xmin, brush$xmax)
ranges$y <- c(brush$ymin, brush$ymax)
} else {
ranges$x <- NULL
ranges$y <- NULL
}
})
})
I would really appreciate if I can get any help regarding to that!
Thanks!

spider graphic line in plotly.graph_objects

When I generate my chart, the line does not end, however, and I tried in many ways, but nothing worked for me.
what is in r, are some variables that I have declared with already defined values
fig = go.Figure()
fig.add_trace(go.Scatterpolar(
name = "Ideal",
r=[ ideal_Funciones_Responsabilidades, ideal_etapas_propias, ideal_Aspectos_Legales, ideal_Gestion_Ambiental, ideal_Gestion_de_Seguridad,
ideal_manejo_Informacion, hallado_Tecnicos, ideal_Humanos , ideal_transversales],
theta=categories,
#connectgaps=True,
#line_color = 'darkviolet'
type= 'scatterpolar',
mode = 'lines',
))
fig.add_trace(go.Scatterpolar(
name = "Hallado",
r=[ hallado_Funciones_Responsabilidades, hallado_etapas_propias, hallado_Aspectos_Legales, hallado_Gestion_Ambiental, hallado_Gestion_de_Seguridad,
hallado_manejo_Informacion, hallado_Tecnicos, hallado_Humanos, hallado_transversales],
theta=categories,
#mode = "markers",
type= 'scatterpolar',
mode = 'lines',
#line_color = 'peru'
))
fig.update_layout(
polar=dict(
radialaxis=dict(
#visible=True,
range=[0, maximo_valor + 1]
)
),
#line_close=True,
# showlegend=False
)
Image:
I will be attentive to your help with this topic.
You can close the line using go.Scatterpolar() by repeating the first element in both the list for r and theta at the end of the list.
Say you declared:
r_list=[ ideal_Funciones_Responsabilidades, ideal_etapas_propias, ideal_Aspectos_Legales, ideal_Gestion_Ambiental, ideal_Gestion_de_Seguridad,
ideal_manejo_Informacion, hallado_Tecnicos, ideal_Humanos , ideal_transversales]
r_list.append(r_list[0])
Then use
r=r_list

Unexpected token in st.mainloop in Tkinter

def billing(): # to create bills for customer-------------------------------------------------------------BILLING system
global c, cur, apt, flag, t, name, name1, add, st, names, qty, sl, qtys, vc_id, n, namee, lb1
m_bill=make_bill()
t=0
vc_id=''
names=[]
qty=[]
sl=[]
n=[]
qtys=['']*10
cur.execute("select *from med")
for i in cur:
n.append(i[1])
c.commit()
if flag=='st':
st.destroy()
else:
apt.destroy()
flag='st'
st=Tk()
st.title('BILLING SYSTEM')
Label(st,text='-'*48+'BILLING SYSTEM'+'-'*49).grid(row=0,column=0,columnspan=7)
Label(st,text='Enter Name: ').grid(row=1,column=0)
name1=Entry(st)
name1.grid(row=1, column=1)
Label(st,text='Enter Address: ').grid(row=2,column=0)
add=Entry(st)
add.grid(row=2, column=1)
Label(st,text="Value Id (if available)").grid(row=3, column=0)
vc_id=Entry(st)
vc_id.grid(row=3, column=1)
Button(st,text='Check V.C.', command=blue).grid(row=4, column=0)
Label(st,text='-'*115).grid(row=6, column=0,columnspan=7)
Label(st,text='SELECT PRODUCT',width=25,relief='ridge').grid(row=7, column=0)
Label(st,text=' RACK QTY LEFT COST ',width=25,relief='ridge').grid(row=7, column=1)
Button(st,text='Add to bill',width=15,command=append2bill).grid(row=8, column=6)
Label(st,text='QUANTITY',width=20,relief='ridge').grid(row=7, column=5)
qtys=Entry(st)
qtys.grid(row=8,column=5)
refresh()
Button(st,width=15,text='Main Menu', command=main_menu).grid(row=1,column=6)
Button(st,width=15,text='Refresh Stock', command=refresh).grid(row=3,column=6)
Button(st,width=15,text='Reset Bill', command=billing).grid(row=4,column=6)
Button(st,width=15,text='Buy', command=lambda:send_mail(m_bill)).grid(row=5,column=6)
Button(st,width=15,text='Save Bill', command=make_bill().grid(row=7,column=6)
st.mainloop()
In the function above, I am getting a weird error in the last line as st.mainloop as invalid syntax. st.mainloop is an inbuilt function provide by Tkinter to run the GUI in loop. I am just pulling my hair on this.
It's solved. There was a missing parenthesis in Button(st,width=15,text='Save Bill', command=make_bill().grid(row=7,column=6))
Your button should look like this:
Button(st, width=15, text='Save Bill', command=make_bill).grid(row=7, column=6)
So your button was not missing a parenthesis but actually had one too many.

Django request with user criteria

I would like to get some help about my future process. I would like that users could create his own django request and then get the result.
Up to now, I created django requests in my script but there are static requests :
request1 = Test.objects.all()
or
query_lastname_ID = request.GET.get('q1ID')
query_firstname_ID = request.GET.get('q1bisID')
query_naissance_ID = request.GET.get('q1terID')
if query_firstname_ID and query_lastname_ID and query_naissance_ID :
query_ID_list = Individu.objects.filter(
Nom__icontains=query_lastname_ID,
Prenom__icontains=query_firstname_ID,
VilleNaissance__icontains=query_naissance_ID)
if len(query_ID_list) != 0 :
messages.success(request, 'Miracle .. Vous avez un résultat !')
else :
messages.error(request, "Oh non .. Vous n'avez aucun résultat !")
All of these requests are static.
Now I would like to let the choice to the user between criteria or mathematic operator.
I won't write table fields in my request but the user could have the choice to get what he wants :
one field
two fields
x fields
the mathematic operator (=, >, <, not egal, ...)
comparison between fields
...
User could get a result thanks to a dynamic request. He could create himself Django request.
Is it possible ? I don't find example or documentations about this kind of process :/
You can try create filter as dict, for example:
map_fields_get = {
'Nom': 'q1ID', 'Prenom': 'q1bisID', 'VilleNaissance': 'q1terID'
}
condition_param = 'YOUR_GET_NAME_FOR_CONDITION'
condition_list = ['icontains', 'iexact', 'gt', 'lt']
condition = request.GET.get('condition_param', 'icontains')
if condition not in condition_list:
# add your logic set default or raise
condition = condition_list[0]
qs_f = {}
for get_f, f in map_fields_get.items():
get_val = request.GET.get(get_f, None)
if get_val:
qs_f_key = '%s__%s' % (f, condition)
qs_f[qs_f_key] = get_val
if qs_f:
query_ID_list = Individu.objects.filter(**qs_f)

different output with mono on linux as on visual studio on win7 with calling a webservice

I use the Exchange webservices to extract attachments from exchange mailserver.
When i call the code on linux with mono a certain text attachment contain some mixed-up strings.
like so
"sam winglin vz" becomes "sainglin vz" -> so it is missing "m w".
I see this about 3 times in a 150kb file. 3 bytes are missing in the linux output vs the windows output.
When i extract it from visual studio the text attachment is perfect.
It is like this example
Save attachments from exchange inbox
Any idea in what direction i should look to fix this?
Code:
#r "Microsoft.Exchange.WebServices.dll"
open Microsoft
open Microsoft.Exchange.WebServices.Data
open System
open System.Net
type PgzExchangeService(url,user,password) =
let service = new ExchangeService(ExchangeVersion.Exchange2007_SP1,
TimeZoneInfo.CreateCustomTimeZone("Central Standard Time",new TimeSpan(-6, 0, 0),"(GMT-06:00) Central Time (US & Canada)","Central Standard Time"))
do
ServicePointManager.ServerCertificateValidationCallback <- ( fun _ _ _ _ -> true )
service.Url <- new Uri(url)
service.Credentials <- new WebCredentials(user, password, "domain")
member this.Service with get() = service
member this.InboxItems = this.Service.FindItems(WellKnownFolderName.Inbox, new ItemView(10))
member this.GetFileAttachments ( item : Item ) =
let emailMessage =
EmailMessage.Bind( this.Service,
item.Id,
new PropertySet(BasePropertySet.IdOnly, ItemSchema.Attachments))
item, emailMessage.Attachments |> Seq.choose (fun attachment -> match box attachment with
| :? FileAttachment as x -> Some(x) | _ -> None)
let mailAtdomain = new PgzExchangeService("https://xx.xx.XX.XX/EWS/Exchange.asmx", "user", "passw")
let printsave (item : Item ,att : seq<FileAttachment>) =
if (Seq.length att) > 0 then
printfn "%A - saving %i attachments" item.Subject (Seq.length att)
att |> Seq.iter ( fun attachment -> printfn "%A" attachment.Name
attachment.Load(#"/tmp/test/" + attachment.Name ) )
// filter so we only have items with attachements and ...
let itemsWithAttachments = mailAtdomain.InboxItems
|> Seq.map mailAtdomain.GetFileAttachments
|> Seq.iter printsave
The code doesn't run on Windows with mono due to a bug in TimeZoneInfo
This sample code runs on linux but not on windows. because of the TimeZoneInfo bug.
But with this the code that works on linux to extract attachments.
Try csv attachments and see if the result is the same. i loose data ! about 3 bytes every somemany lines
mail me if you need the sample csv attachment that gives the problem
Here is a c# version that i used for testing. Running from VS2010 it works perfect but on linux with mono the attachment has wrong size , some bytes are missing?!.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Exchange.WebServices.Data;
using System.Net;
namespace Exchange_SDP_Attachment_Extracter
{
public class PgzExchangeService
{
public void Extract()
{
ExchangeService service = new ExchangeService (ExchangeVersion.Exchange2007_SP1,TimeZoneInfo.Local);
service.Credentials = new NetworkCredential("user", "pass", "domain");
service.Url = new Uri("https://xx.xx.xx.xx/EWS/Exchange.asmx");
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, new ItemView(10));
foreach (Item item in findResults.Items)
{
EmailMessage e = EmailMessage.Bind
(service,
item.Id,
new PropertySet(BasePropertySet.IdOnly, ItemSchema.Attachments));
foreach ( Attachment att in e.Attachments )
{
if (att is FileAttachment)
{
FileAttachment fileAttachment = (FileAttachment)att;
fileAttachment.Load(#"/tmp/testsdp/" + fileAttachment.Name);
}
}
}
}
}
class Program
{
static void Main(string[] args)
{
PgzExchangeService pgz = new PgzExchangeService();
pgz.Extract();
}
}
}
My suggestion would be to try examining the text attachment with a hex editor. There has be something unusual about those three occurrences. You need to find out what those three lines have in common before any of us can recommend a course of action to you.