Visualvalue equivalent for string

Discussions about CSEntry
htuser
Posts: 327
Joined: December 19th, 2011, 6:26 pm
Location: HAITI

Visualvalue equivalent for string

Postby htuser » July 11th, 2018, 1:31 am

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!

Gregory Martin
Posts: 1077
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Visualvalue equivalent for string

Postby Gregory Martin » September 10th, 2018, 9:27 am

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?

htuser
Posts: 327
Joined: December 19th, 2011, 6:26 pm
Location: HAITI

Re: Visualvalue equivalent for string

Postby htuser » September 11th, 2018, 11:26 pm

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.


Return to “Entry”