Functions
String functions
Expressions में strings के साथ काम करते समय, literal strings को enclose करने के लिए single quotes (’’) का उपयोग करना महत्वपूर्ण है। हालांकि, एक अपवाद तब उत्पन्न होता है जब आप एक literal string के भीतर single quotes शामिल करना चाहते हैं। ऐसे मामलों में, आप पूरी string को enclose करने के लिए double quotes ("") का उपयोग कर सकते हैं।
उदाहरण के लिए:
- सही: if(${yesno} = 1, “a string with ‘single quotes’ in it”, “no single quotes here”)
- गलत: if(${yesno} = 1, ‘a string with ‘single quotes’ in it’, ’no single quotes here’)
Smart quotes के संबंध में, उनकी उपस्थिति के बारे में जागरूक होना महत्वपूर्ण है, क्योंकि वे expressions में समस्याएं पैदा कर सकते हैं। कई rich text editors स्वचालित रूप से straight quotes ("" या ‘’) को smart quotes या curly quotes ("" या ‘’) में convert करते हैं, जिससे syntax errors या अप्रत्याशित व्यवहार हो सकता है। इससे बचने के लिए, अपने expressions में straight quotes (’’) का लगातार उपयोग सुनिश्चित करें।
rtSurvey विभिन्न functions का समर्थन करता है, जिनमें शामिल हैं:
string(field): किसी field को string में convert करता है।- उदाहरण:
string(34.8)को'34.8'में convert किया जाएगा।
- उदाहरण:
string-length(field): एक string field की length return करता है।- उदाहरण:
string-length(.) > 3 and string-length(.) < 10का उपयोग यह सुनिश्चित करने के लिए किया जा सकता है कि current field 3 से 10 characters के बीच हो।
- उदाहरण:
substr(fieldorstring, startindex, endindex):startindexसे शुरू होकरendindexसे ठीक पहले तक का substring return करता है। Indexes string में पहले character के लिए 0 से शुरू होते हैं।- उदाहरण:
substr(${phone}, 0, 3)phone number के पहले तीन digits return करेगा।
- उदाहरण:
concat(a, b, c, ...): Fields (और/या strings) को एक साथ concatenate करता है।- उदाहरण:
concat(${firstname}, ' ', ${lastname})firstnameऔरlastnamefields के values को combine करके पूरा नाम return करेगा।
- उदाहरण:
linebreak(): एक linebreak character return करता है।- उदाहरण:
concat(${field1}, linebreak(), ${field2}, linebreak(), ${field3})उनके बीच linebreaks के साथ तीन field values की एक list return करेगा।
- उदाहरण:
lower(): एक string को सभी lowercase characters में convert करता है।- उदाहरण:
lower('Street Name')“street name” return करेगा।
- उदाहरण:
upper(): एक string को सभी uppercase characters में convert करता है।- उदाहरण:
upper('Street Name')“STREET NAME” return करेगा।
- उदाहरण:
select_one और select_multiple functions
count-selected(field): एक select_multiple field में चुने गए items की संख्या return करता है।- उदाहरण:
count-selected(.) = 3एक constraint expression के रूप में उपयोग किया जा सकता है ताकि यह सुनिश्चित हो कि ठीक तीन choices चुने गए हों।
- उदाहरण:
selected(field, value): इस पर निर्भर करते हुए true या false return करता है कि निर्दिष्ट value select_one या select_multiple field में चुनी गई थी या नहीं।- उदाहरण:
selected(${color}, 'Blue')एक relevance expression के रूप में उपयोग किया जा सकता है ताकि एक group या field केवल तभी दिखाई दे जब उत्तरदाता ने अपने पसंदीदा रंग के रूप में “Blue” चुना हो। - नोट: दूसरा parameter हमेशा choice value निर्दिष्ट करना चाहिए, choice label नहीं। form definition की choices worksheet में value column से मूल्य का उपयोग करें।
- उदाहरण:
selected-at(field, number): एक select_multiple field में निर्दिष्ट position पर चुने गए item को return करता है। जब पास किया गया number 0 है, तो यह पहला चुना गया item return करता है; जब number 1 है, तो यह दूसरा चुना गया item return करता है, और इसी तरह।- उदाहरण:
selected-at(${fruits}, 0) = 'Apple'एक relevance expression के रूप में उपयोग किया जा सकता है ताकि एक group या field केवल तभी दिखाई दे जब पहला चुना गया choice “Apple” हो। - नोट: return किया गया मूल्य choice value होगा, choice label नहीं। form definition की choices worksheet में value column से मूल्य का उपयोग करें।
- उदाहरण:
choice-label(field, value): form definition की choices worksheet में defined एक select_one या select_multiple field choice के लिए label return करता है।- उदाहरण 1:
choice-label(${country}, ${country})countryनामक field में वर्तमान में चुने गए choice के लिए choice label return करेगा। - उदाहरण 2:
choice-label(${languages}, selected-at(${languages}, 0))languagesनामक field में पहले चुने गए choice के लिए label return करेगा। - नोट: यह function choice label retrieve करता है, value नहीं। यह form definition की choices worksheet में label column का उपयोग करता है।
- उदाहरण 1:
Repeated field functions
rtSurvey में, यदि आप एक ही प्रश्न(ों) को कई बार पूछना चाहते हैं, तो आप एक field को एक repeat group के अंदर रख सकते हैं। इससे एक ही field के multiple instances बनते हैं। निम्नलिखित functions आपको इन repeated fields और उनके द्वारा produce किए गए repeated data से deal करने में मदद कर सकते हैं।
join(string, repeatedfield): एक repeat group के भीतर एक field के लिए, values की एक string-separated list generate करता है। पहला parameter values को अलग करने के लिए उपयोग किए जाने वाले delimiter को निर्दिष्ट करता है।- उदाहरण:
join(', ', ${member_name})सभी दर्ज किए गए names से एक comma-separated list generate करेगा।
- उदाहरण:
join-if(string, repeatedfield, expression):join()की तरह ही काम करता है, सिवाय इसके कि यह supplied expression का उपयोग करके repeat group में प्रत्येक instance को check करता है। यदि expression false evaluate होती है, तो item output से omit हो जाएगा।- उदाहरण:
join-if(', ', ${member_name}, ${age} >= 18)केवल adult members (18 और उससे अधिक आयु वाले) के names की comma-separated list generate करेगा।
- उदाहरण:
count(repeatgroup): वह वर्तमान संख्या return करता है जितनी बार एक repeat group repeat हुआ है।- उदाहरण:
count(${groupname})group के instances की संख्या return करेगा।
- उदाहरण:
count-if(repeatgroup, expression):count()की तरह ही काम करता है, सिवाय इसके कि यह supplied expression का उपयोग करके repeat group में प्रत्येक instance को check करता है। यदि expression false evaluate होती है, तो item output से omit हो जाएगा।- उदाहरण:
count-if(${members}, ${age} >= 18)“members” repeat group के भीतर age field के आधार पर adult members की count return करेगा।
- उदाहरण:
sum(repeatedfield): एक repeat group के भीतर एक field के लिए, सभी values का sum calculate करता है।- उदाहरण:
sum(${loan_amount})सभी loans का कुल मूल्य return करेगा।
- उदाहरण:
sum-if(repeatedfield, expression):sum()की तरह ही काम करता है, सिवाय इसके कि यह supplied expression का उपयोग करके repeat group में प्रत्येक instance को check करता है। यदि expression false evaluate होती है, तो item output से omit हो जाएगा।- उदाहरण:
sum-if(${loan_amount}, ${loan_amount} > 500)500 से अधिक के सभी loans का कुल मूल्य return करेगा। छोटे loans को नज़रअंदाज़ किया जाएगा।
- उदाहरण:
min(repeatedfield): एक repeat group के भीतर एक field के लिए, सभी values का minimum calculate करता है।- उदाहरण:
min(${member_age})group में सबसे युवा member की आयु return करेगा।
- उदाहरण:
min-if(repeatedfield, expression):min()की तरह ही काम करता है, सिवाय इसके कि यह supplied expression का उपयोग करके repeat group में प्रत्येक instance को check करता है। यदि expression false evaluate होती है, तो item output से omit हो जाएगा।- उदाहरण:
min-if(${member_age}, ${member_age} >= 18)group में सबसे युवा adult की आयु return करेगा। 18 से कम आयु वालों को नज़रअंदाज़ किया जाएगा।
- उदाहरण:
max(repeatedfield): एक repeat group के भीतर एक field के लिए, सभी values का maximum calculate करता है।- उदाहरण:
max(${member_age})group में सबसे वृद्ध member की आयु return करेगा।
- उदाहरण:
max-if(repeatedfield, expression):max()की तरह ही काम करता है, सिवाय इसके कि यह supplied expression का उपयोग करके repeat group में प्रत्येक instance को check करता है। यदि expression false evaluate होती है, तो item output से omit हो जाएगा।- उदाहरण:
max-if(${member_age}, ${member_age} >= 18)group में सबसे वृद्ध adult की आयु return करेगा। 18 से कम आयु वालों को नज़रअंदाज़ किया जाएगा।
- उदाहरण:
index(): एक repeat group के भीतर call करने पर, current group या instance के लिए index number return करता है।- उदाहरण: एक repeat group के भीतर उपयोग करने पर
index()पहले instance के लिए 1, दूसरे के लिए 2 return करेगा, और इसी तरह।
- उदाहरण: एक repeat group के भीतर उपयोग करने पर
indexed-repeat(repeatedfield, repeatgroup, index): उस repeat group के बाहर से एक repeat group के अंदर एक field या group को reference करता है। पहला parameter interest के repeated field या group को निर्दिष्ट करता है, दूसरा उस repeat group को निर्दिष्ट करता है जिसके भीतर field या group स्थित है, और तीसरा उपयोग करने के लिए repeat group के भीतर instance number निर्दिष्ट करता है।- उदाहरण 1:
indexed-repeat(${name}, ${names}, 1)पहला उपलब्ध name return करेगा जब name field “names” नामक पूर्व repeat group के अंदर हो। - उदाहरण 2:
indexed-repeat(${name}, ${names}, index())current repeat group के instance number के corresponding name pull करेगा।
- उदाहरण 1:
rank-index(index, repeatedfield): यह function repeat group के बाहर उपयोग के लिए एक repeated field के निर्दिष्ट instance का ordinal rank calculate करता है। Rank 1 उच्चतम मूल्य वाले instance को assign किया जाता है, rank 2 अगले-उच्चतम मूल्य वाले instance को, और इसी तरह। यदि आप एक invalid index या non-numeric मूल्य वाले instance का index pass करते हैं, तो 999 का rank return किया जाएगा।- उदाहरण:
rank-index(1, ${random_draw})अन्य instances के values की तुलना में इसकेrandom_drawfield के value के आधार पर पहले instance का rank calculate करता है।
- उदाहरण:
rank-index-if(index, repeatedfield, expression): यह functionrank-index()की तरह ही काम करता है, लेकिन यह supplied expression का उपयोग करके repeated field के repeat group में प्रत्येक instance को check करता है। यदि expression false evaluate होती है, तो item calculation से omit हो जाएगा। उपयोग किया गया index प्रत्येक instance के लिए expression evaluate करने से पहले instances के full set पर आधारित है। यदि आप किसी ऐसे instance का index pass करते हैं जिसे expression को satisfy न करने के कारण ignore किया गया था, तो इसे एक invalid index माना जाता है, और 999 का rank return किया जाएगा।- उदाहरण:
rank-index-if(1, ${age}, ${age} >= 18)adults के set के भीतर age rank calculate करता है, केवल उन instances पर विचार करता है जहाँ age 18 या उससे अधिक है।
- उदाहरण:
Number functions
| Operator | Operation | Example | Example answer |
|---|---|---|---|
+ | जोड़ | 1 + 1 | 2 |
- | घटाव | 3 - 2 | 1 |
* | गुणा | 3 * 2 | 6 |
div | भाग | 10 div 2 | 5 |
mod | Modulus | 9 mod 2 | 1 |
rtSurvey number functions का समर्थन करता है, जिनमें शामिल हैं:
number(field): field के मूल्य को एक number में convert करता है।- उदाहरण:
number('34.8')= 34.8
- उदाहरण:
int(field): field के मूल्य को एक integer में convert करता है।- उदाहरण:
int('39.2')= 39
- उदाहरण:
min(field1, ..., fieldx): पास किए गए fields के बीच minimum value return करता है।- उदाहरण:
min(${father_age}, ${mother_age})माँ या पिता की आयु return करेगा, जो भी छोटी हो।
- उदाहरण:
max(field1, ..., fieldx): पास किए गए fields के बीच maximum value return करता है।- उदाहरण:
max(${father_age}, ${mother_age})माँ या पिता की आयु return करेगा, जो भी बड़ी हो।
- उदाहरण:
format-number(field): एक integer या decimal field के मूल्य को user की locale settings के अनुसार format करता है।- उदाहरण:
format-number(${income})“120000” को “120,000” के रूप में format कर सकता है।
- उदाहरण:
round(field, digits): numeric field मूल्य को decimal place के बाद निर्दिष्ट digits की संख्या तक round करता है।- उदाहरण:
round(${interest_rate}, 2)
- उदाहरण:
abs(number): एक number का absolute value return करता है।pow(base, exponent): पहले parameter का मूल्य दूसरे parameter की power तक उठाया हुआ return करता है।- प्रत्येक parameter एक field, number, या expression हो सकता है।
log10(fieldorvalue): पास किए गए field या value का base-ten logarithm return करता है।sin(fieldorvalue): पास किए गए field या value का sine return करता है, radians में expressed।cos(fieldorvalue): पास किए गए field या value का cosine return करता है, radians में expressed।tan(fieldorvalue): पास किए गए field या value का tangent return करता है, radians में expressed।asin(fieldorvalue): पास किए गए field या value का arcsine return करता है, radians में expressed।acos(fieldorvalue): पास किए गए field या value का arccosine return करता है, radians में expressed।atan(fieldorvalue): पास किए गए field या value का arctangent return करता है, radians में expressed।atan2(x, y): origin पर coordinate (x, y) वाले point और positive x-axis से subtended angle return करता है radians में। परिणाम -pi() से pi() की range में है।sqrt(fieldorvalue): पास किए गए field या value का non-negative square root return करता है।exp(x): e^x का मूल्य return करता है।pi(): pi का मूल्य return करता है।
Date और time functions
rtSurvey में Date values YYYY-MM-DD format में strings के रूप में संग्रहीत होती हैं। Datetime values ISO 8601 strings (YYYY-MM-DDTHH:MM:SS) के रूप में संग्रहीत होती हैं। arithmetic के लिए number में convert करने के लिए decimal-date-time() का उपयोग करें (जैसे, durations calculate करना)।
today(): आज की तारीख कोYYYY-MM-DDformat में string के रूप में return करता है। form खुलने पर एक बार evaluate होता है।- उदाहरण:
today()→'2024-03-15' - सामान्य उपयोग: आज की तारीख pre-fill करने के लिए
defaultcolumn, या date field की तुलना करने के लिएrelevant/constraintमें।
- उदाहरण:
now(): वर्तमान date और time को ISO 8601 string के रूप में return करता है। हर बार expression compute होने पर evaluate होता है।- उदाहरण:
now()→'2024-03-15T14:32:00.000+03:00' - सामान्य उपयोग: survey के दौरान किसी specific event का exact timestamp recording करना।
- उदाहरण:
date(value): एक value (string या number) को date string में convert करता है। Calculated values को date type में coerce करने के लिए उपयोगी।- उदाहरण:
date('2024-03-15')→'2024-03-15'
- उदाहरण:
date-time(value): एक value को datetime string में convert करता है।- उदाहरण:
date-time(${event_timestamp})
- उदाहरण:
decimal-date-time(value): एक date या datetime string को Unix epoch के बाद milliseconds को 86400000 से divide करके (यानी 1970-01-01 के बाद fractional days) एक decimal number में convert करता है। Dates पर arithmetic perform करने के लिए इसका उपयोग करें।- उदाहरण: दो dates के बीच days में duration:
decimal-date-time(${end_date}) - decimal-date-time(${start_date}) - उदाहरण: दो datetimes के बीच minutes में duration:
(decimal-date-time(${end_time}) - decimal-date-time(${start_time})) * 1440
- उदाहरण: दो dates के बीच days में duration:
format-date(date, format): एक pattern string का उपयोग करके date value को format करता है।- Format tokens:
%Y(4-digit year),%y(2-digit year),%m(month 01–12),%d(day 01–31),%a(abbreviated weekday),%b(abbreviated month name) - उदाहरण:
format-date(today(), '%d/%m/%Y')→'15/03/2024' - उदाहरण:
format-date(${dob}, '%B %d, %Y')→'March 15, 1990'
- Format tokens:
format-date-time(datetime, format): एक pattern string का उपयोग करके datetime value को format करता है। सभीformat-datetokens के अलावा स्वीकार करता है:%H(hour 00–23),%h(hour 01–12),%M(minutes 00–59),%S(seconds 00–59),%3(milliseconds),%P(AM/PM)- उदाहरण:
format-date-time(now(), '%d/%m/%Y %H:%M')→'15/03/2024 14:32' - उदाहरण:
format-date-time(${event_time}, '%I:%M %p')→'02:32 PM'
Boolean functions
boolean(value): किसी भी value को boolean में convert करता है। non-empty strings, non-zero numbers, औरtrueके लिएtruereturn करता है; empty strings,0, औरfalseके लिएfalsereturn करता है।- उदाहरण:
boolean(${name})truereturn करता है यदिnameempty नहीं है।
- उदाहरण:
boolean-from-string(string):truereturn करता है यदि string'1'या'true'है (case-insensitive); अन्यथाfalsereturn करता है।- उदाहरण:
boolean-from-string(${enabled_flag})— तब उपयोगी जब कोई field text के रूप में'true'/'false'संग्रहीत करता है।
- उदाहरण:
true(): boolean मूल्यtruereturn करता है।- उदाहरण:
requiredcolumn में,true()yesके समान है।
- उदाहरण:
false(): boolean मूल्यfalsereturn करता है।- उदाहरण:
if(${skip_section} = 'yes', false(), true())— dynamically required set करें।
- उदाहरण:
not(expression): expression का logical negation return करता है। यदि expression false है तोtruereturn करता है, और इसके विपरीत।- उदाहरण:
not(${consent} = 'yes')— तब एक warning दिखाएं जब consent नहीं दी गई हो। - उदाहरण:
not(selected(${issues}, 'none'))— detail की आवश्यकता केवल तभी हो जब “none” नहीं चुना गया हो।
- उदाहरण:
Additional string functions
starts-with(string, prefix):truereturn करता है यदिstringprefixसे शुरू होती है।- उदाहरण:
starts-with(${phone}, '+254')जांचता है कि phone number Kenya country code से शुरू होता है।
- उदाहरण:
contains(string, substring):truereturn करता है यदिstringमेंsubstringशामिल है।- उदाहरण:
contains(${email}, '@')जांचता है कि email address में@sign है। - उदाहरण:
contains(${notes}, 'urgent')यदि notes में “urgent” का उल्लेख है तो एक follow-up question trigger करता है।
- उदाहरण:
substring-before(string, needle):stringका वह हिस्सा return करता है जोneedleके पहले occurrence से पहले आता है।- उदाहरण:
substring-before(${full_name}, ' ')पहला word (first name) extract करता है।
- उदाहरण:
substring-after(string, needle):stringका वह हिस्सा return करता है जोneedleके पहले occurrence के बाद आता है।- उदाहरण:
substring-after(${email}, '@')email address का domain हिस्सा extract करता है।
- उदाहरण:
normalize-space(string): leading और trailing whitespace strip करता है और सभी internal whitespace sequences को एक single space में collapse करता है।- उदाहरण:
normalize-space(${name})— एक नाम को clean करता है जो extra spaces के साथ typed हो सकता है।
- उदाहरण:
translate(string, search_chars, replace_chars):stringमें प्रत्येक character को replace करता है जोsearch_charsमेंreplace_charsके corresponding character के साथ दिखाई देता है।search_charsमें वे characters जिनकाreplace_charsमें कोई corresponding character नहीं है, delete हो जाते हैं।- उदाहरण:
translate(${code}, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')uppercase में convert करता है (upper()के समान)। - उदाहरण:
translate(${phone}, ' -()', '')phone number से spaces, dashes, और parentheses हटाता है।
- उदाहरण:
Additional math functions
floor(number):numberसे कम या बराबर सबसे बड़ा integer return करता है (negative infinity की ओर round करता है)।- उदाहरण:
floor(4.9)= 4,floor(-2.1)= -3
- उदाहरण:
ceiling(number):numberसे अधिक या बराबर सबसे छोटा integer return करता है (positive infinity की ओर round करता है)।- उदाहरण:
ceiling(4.1)= 5,ceiling(-2.9)= -2
- उदाहरण:
random(): 0.0 (inclusive) और 1.0 (exclusive) के बीच एक random decimal number return करता है। आमतौर परcalculatefields में random values assign करने या question order randomize करने के लिए उपयोग किया जाता है।- उदाहरण:
random()→ जैसे,0.7341 - उदाहरण:
int(random() * 6) + 1→ random number 1–6 (dice roll)
- उदाहरण:
coalesce(a, b): यदिanon-empty है तोareturn करता है; अन्यथाbreturn करता है। तब fallback के रूप में उपयोगी जब एक field empty हो सकती है।- उदाहरण:
coalesce(${preferred_name}, ${full_name})— यदि set हो तो preferred name का उपयोग करें, अन्यथा full name पर fall back करें।
- उदाहरण:
once(value):valueको evaluate करके store करता है, लेकिन केवल तभी जब current field empty हो। यदि field में पहले से कोई value है (जैसे, पहले set की गई थी), तोonce()existing value को unchanged return करता है। यह recalculation को user input overwrite करने से रोकता है।- उदाहरण:
defaultcolumn मेंonce(today())आज की तारीख एक बार set करता है और update नहीं होता यदि गणनाकर्ता form को re-open करे। - उदाहरण:
once(uuid())एक UUID एक बार generate करता है और re-edits के दौरान इसे stable रखता है।
- उदाहरण:
Geo functions
area(geoshape_value): एक geoshape (polygon) value द्वारा enclosed area square meters में calculate करता है।- Parameter
lat1 lon1 0 0; lat2 lon2 0 0; ...format में एक geoshape field value है - उदाहरण:
area(${field_boundary})— m² में surveyed field का area calculate करें। - उदाहरण:
round(area(${field_boundary}) div 10000, 2)— hectares में convert करें।
- Parameter
distance(coordinates): एक geotrace (line) की total path length meters में calculate करता है, या दो geopoints के बीच की distance।- एक geotrace के लिए:
distance(${route})meters में total path length return करता है। - दो geopoints के लिए:
distance(concat(${point_a}, ' ', ${point_b}))उनके बीच की distance return करता है। - उदाहरण:
round(distance(${road_trace}) div 1000, 3)— kilometers में road की length।
- एक geotrace के लिए:
Validation functions
regex(value, pattern):truereturn करता है यदिvalueregular expressionpatternसे match करती है। pattern-based validation के लिएconstraintcolumn में उपयोग करें।- Pattern standard regex syntax (POSIX ERE subset) का उपयोग करता है।
- उदाहरण:
regex(., '^[0-9]{10}$')— 10-digit number validate करें। - उदाहरण:
regex(., '^[A-Z]{2}[0-9]{6}$')— passport number format validate करें (2 uppercase letters followed by 6 digits)। - उदाहरण:
regex(., '^[^@]+@[^@]+\.[^@]{2,}$')— basic email format check।
checklist(min, max, v1, v2, ...): boolean expressions की एक list evaluate करता है औरtruereturn करता है यदिtruevalues की संख्याminऔरmaxके बीच (inclusive) हो। उस bound को skip करने के लिएminयाmaxके लिए-1pass करें।- उदाहरण:
checklist(2, 3, ${q1} = 'yes', ${q2} = 'yes', ${q3} = 'yes')— पास होता है यदि तीन conditions में से ठीक 2 या 3 true हों। - उदाहरण:
checklist(1, -1, ${smoke_alarm}, ${fire_ext}, ${emergency_plan})— कम से कम एक safety measure true होना चाहिए।
- उदाहरण:
weighted-checklist(min, max, v1, w1, v2, w2, ...):checklist()की तरह, लेकिन प्रत्येक value का एक weight है।truevalues के weights का summinऔरmaxके बीच होना चाहिए।- उदाहरण:
weighted-checklist(10, -1, ${has_toilet}, 4, ${has_sink}, 3, ${has_shower}, 5)— present facilities के weights का sum कम से कम 10 होना चाहिए।
- उदाहरण:
Utility functions
uuid(): एक random UUID (RFC 4122 v4 format) को string के रूप में generate करता है।- उदाहरण:
uuid()→'a3f8b2c1-4d5e-6f7a-8b9c-0d1e2f3a4b5c' - आमतौर पर stable unique ID generate करने के लिए
once()के साथ उपयोग किया जाता है:once(uuid())
- उदाहरण:
version(): settings worksheet में set form केversionattribute का मूल्य return करता है।- उदाहरण:
version()→'3.1' - exported data में form version embed करने के लिए
calculatefields में उपयोगी।
- उदाहरण:
position(): repeat group के अंदर call करने पर, current repeat instance का 1-based index return करता है।- उदाहरण: पहले instance में
position()1return करता है, दूसरे में2, और इसी तरह। - देखें:
index()(alias), group के बाहर से repeat values reference करने के लिएindexed-repeat()।
- उदाहरण: पहले instance में
thousandsep(length, separator, value): thousands separator के साथ एक number format करता है।lengthminimum total string length है (यदि छोटा हो तो spaces से padded),separatorउपयोग करने के लिए character है (जैसे','), औरvalueformat करने के लिए number है।- उदाहरण:
thousandsep(0, ',', 1234567)→'1,234,567' - उदाहरण:
thousandsep(0, '.', ${income})→ period को thousands separator के रूप में income format करता है।
- उदाहरण:
substr-jsonpath(value, jsonpath): JSONPath expression का उपयोग करके JSON string से substring extract करता है।- उदाहरण:
substr-jsonpath(${api_response}, '$.data.name')—api_responseमें stored JSON string सेnamefield extract करता है। - आमतौर पर API responses से specific values extract करने के लिए
callapi()के साथ उपयोग किया जाता है।
- उदाहरण: