Hi Everyone,
I have field which has values "a", "b", "c" and I need to get the count of these values in record types. Can anyone please help me with this.
Discussion posts and replies are publicly visible
hi Rahul009 are you saving a,b,c values in one column in table ?can you check this code and let me know
length(split(local!data['recordType!recordname.fieldname],","))
Hi Rahul009 , if i have understood your question correctly, you can create the custom record field in the record type and use the Aggregation function to count the occurrence of "a", "b", "c".
sum(split({1,2,3},","))
replace {1,2,3} to pass the field you are referring to
Hi Rahul009 I would like to get more information about what you are trying to achieve.
*are you trying to save the values on differente record types or just one record type?
*what is the input values are you receiving on your field ? if comma its present.
for now I can give you a possible solution:
Rule:
a!localVariables( local!textField, { a!sectionLayout( contents: {} ), a!sectionLayout( label: "Field Values Into Record Types", contents: { a!textField( label: "Field", labelPosition: "ABOVE", value: local!textField, saveInto: local!textField, refreshAfter: "UNFOCUS", validations: {} ), a!buttonArrayLayout( buttons: { a!buttonWidget( label: "Save", value: ri!theRecord, saveInto: a!save(ri!theRecord, length(split(local!textField, ","))), submit: true, style: "OUTLINE" ) }, align: "START", marginBelow: "NONE" ) } ) } )
Interface:
Results:
I hope this works for you, greetings.