Page 1 of 1

Visualvalue equivalent for string

Posted: July 11th, 2018, 1:31 am
by htuser
Dear Cspro Developer Team,
I'm using case label based string variable. But unfortunately, when resuming after partial save, if i don't pass over item used for caselabel, it become empty... Please do you have an equivalent of visualvalue for string items?
string caseLabel = maketext("%03d: %s %s",visualvalue (IQ_1_NUMERO_DU_QUESTIONNAIRF), strip(ID1_2_PARCEL),strip (ID12_1_CROP));


In the future, when sqlquery will be able to extract item, this issue will be solved.

Thanks in advance for support!

Re: Visualvalue equivalent for string

Posted: September 10th, 2018, 9:27 am
by Gregory Martin
The VisualValue function is only necessary for numeric values. CSPro will always give you the value ("visual" or otherwise) for alpha fields, so your case label should work regardless of if the alpha field was skipped over.

Are you sure that this isn't working?

Re: Visualvalue equivalent for string

Posted: September 11th, 2018, 11:26 pm
by htuser
Hi Greg,
As mentioned in previous message, there's an issue with with case label when resuming after partial save with string. if i don't pass over item used for caselabel, concerned values become empty...
By example, if i use ID_QUESTIONNAIRE (a numeric ID item) and another item : PARCELS_NAME (a string item),
assuming
ID_QUESTIONNAIRE=145 and PARCELS_NAME= LABOULE, normally, with this logic: string caseLabel = maketext("%03d: %s ",visualvalue (IQ_1_NUMERO_DU_QUESTIONNAIRE), strip(PARCELS_NAME));
the case label will be 145:LABOULE.
However, when resuming, if we skip PARCELS_NAME or quit, exit before PARCELS_NAME, the case label will be 145:
I'll send to you a small video about soon.