Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
From the following, I jus want LA_GRMTH as the output.
Is this possible using SubField function?
"RPRPLA_GRMTH_CD","relatedparty":"'
Thanks all for you help.
Vidhya
You can maybe use the occurence index in Textbetween() function:
TextBetween(FORM_DATA,'"relationshipinfo":[{"relationship":"R','_CD',1)as Primary_Relation,
TextBetween(FORM_DATA,'"relationshipinfo":[{"relationship":"R','_CD',2)as Secondary_Relation,
Secondary_Relation should be NULL in most records. You can decide what you want to do with these fields, e.g. concatenate into one or create a Hierarchy out of that.
This just a single data point, what's the pattern here? share few more datapoints with the expected output to get a better response which will work across your database
Could be possible with Subfield but you need to provide few more data with expected output
I agree that we need to come to a rule how the part of interest can be extracted from your input.
Looking at your sample, it would be difficult using Subfield(), but maybe using Textbetween():
=TextBetween('RPRPLA_GRMTH_CD','RPRP','_CD')
Hi Vidhya,
try this,
Mid('RPRPLA_GRMTH_CD',5,8) as MID
If u share your data with required output. you will get good response From Community.
Regards,
Mahesh.
Thanks for the TextBetween function, but in my script, string is not constant and it will vary like the below.
Following are few examples
[{"relationship":"RPRPLA_GRMTH_CD","relatedparty":"LA_0"}]
[{"relationship":"RNMLA_WIFE_CD","relatedparty":"LA_0"}]
[{"relationship":"RNMLA_MOTH_CD","relatedparty":"LA_0"}]
[{"relationship":"RPRPLA_FATH_CD","relatedparty":"LA_0"}]
Output should be
LA_GRMTH
LA_WIFE
LA_MOTH
LA_FATH
Thanks in advance
Hi Vidhya,
You can try below expression.
=index(Field_Name,$(vSearchString),1)
Field_Name is your field in the table
vSearchString is variable storing the string you want to search.
Can you please share the exact requirement as above function only returns the index of the search string in the main string.
Do you want to replace the string with some other string ?
Thanks,
Chetan
Thanks for the TextBetween function, but in my script, string is not constant and it will vary like the below.
Following are few examples
[{"relationship":"RPRPLA_GRMTH_CD","relatedparty":"LA_0"}]
[{"relationship":"RNMLA_WIFE_CD","relatedparty":"LA_0"}]
[{"relationship":"RNMLA_MOTH_CD","relatedparty":"LA_0"}]
[{"relationship":"RPRPLA_FATH_CD","relatedparty":"LA_0"}]
Output should be
LA_GRMTH
LA_WIFE
LA_MOTH
LA_FATH
Thanks in advance
How about this:
'LA_' & TextBetween(FieldName, 'LA_', '"') as NewField
Or maybe
'LA_' & TextBetween(FieldName, 'LA_', '_CD') as NewField