03/05/2025 - @Alex ha scritto:
parlo del contenuto di FeedbackComment, decisamente tecnica innovativa... forse da ri-ragionare
Ciao @Alex , .... e si, diciamo di si ;-)
Io per esempio in un modulo standard farei una cosa di questo tipo con una collection : .... tu come faresti ?
Option Compare Database
Option Explicit
' Initialize const collection
Private MyConstC As Collection
' Property for get public collection
Public Property Get MyFeedbackColl() As Collection
If MyConstC Is Nothing Then
Set MyConstC = New Collection
MyConstC.Add "01) For this document is not necessary any feedback by Vendor because it is already approved or under review"
MyConstC.Add "02) First submission of this document is still pending. "
MyConstC.Add "03) Last feedback dated {0} is not including an expected submission date. "
MyConstC.Add "04) Last feedback dated {0} is expired because "
MyConstC.Add "05) Last feedback dated {0} is still valid. "
MyConstC.Add "06) There is no feedback from Vendor about this document. "
MyConstC.Add "07) Last feedback dated {0} is expired because the feedback date is before the last submission date. Last submission date: "
End If
Set MyFeedbackColl = MyConstC
End Property
e si usa in questo modo, utilizzando l'indice della collection:
per esempio poniamo di richiamare l'indice 1 e l'indice 3 della collection e componiamo la stringa desiderata...
' Volendo richiamare l'elemento 1
FeedbackComment = MyFeedbackColl(1)
RESTITUISCE :
01) For this document is not necessary any feedback by Vendor because it is already approved or under review
' Oppure - Volendo richiamare l'elemento 3 sostituendo il parametro all'interno della stringa con
' FeedbackDate e poniamo che contenga la data del 05/05/2025
FeedbackComment = Replace(MyFeedbackColl(3), "{0}", FeedbackDate)
RESTITUISCE :
03) Last feedback dated 05/05/2025 is not including an expected submission date.
-----------------------------------------------------------------------------------------------------------------------------
QUINDI PER TUTTI GLI ELEMNTI SI OTTERRA':
01) For this document is not necessary any feedback by Vendor because it is already approved or under review
02) First submission of this document is still pending.
03) Last feedback dated 05/05/2025 is not including an expected submission date.
04) Last feedback dated 05/05/2025 is expired because
05) Last feedback dated 05/05/2025 is still valid.
06) There is no feedback from Vendor about this document.
07) Last feedback dated 05/05/2025 is expired because the feedback date is before the last submission date. Last submission date:
DOVE IL SEGNAPOSTO {0} VIENE SOSTITUITO PER ESEMPIO CON LA DATA DI CUI ESEMPIO SOPRA RIPORTATO
.
@Alex dammi un feedback ;-) dimmi se è troppo contorto o se si può fare meglio (penso sicuramente di si) .... grazie ;-)
Da una parte mi spiace per fcaliandro, sembra il nostro un accanimento. ;-)
Invece è solo un modo per segnalare diverse cose che possono essere sicuramente fatte meglio e con criterio.
Spero che non se la prenda, ma che possa far tesoro delle indicazioni date, approfondire gli argomenti trattati e capire il perchè di tutte queste segnalazioni.
Alla fine si cerca solo di dare indicazioni utili.