Skip to main content

HI Guys,


Would any of you know of a way to accomplish the following , preferably without JS?


I have 3 Decks based on 3 different models/objects, on which user is able to select certain records and by clicking on deck for each record they want, it updates on each selected a lookup field and a date field. Until now all good


Now I’m trying to find a way to concatenate & list all those records Selected & Saved in a SF note field. Each object uses different fields.


Example:


Object/model 1, we selected 3 Records, and want thsis text to appear {{Doc_Name__c}} - {{Doc_Date__c}} for each record


Object 2, we selected 2 Records, and want this text to appear: {{Category__c}} - {{Date__c}}


Object 3 we selected 1 Record, and want thsi text to appear: {{Test_1__c}} - {{Date2__c}}


So my final note field should look like this: (with merged data ofc)


{{Doc_Name__c}} - {{Doc_Date__c}}


{{Doc_Name__c}} - {{Doc_Date__c}}


{{Doc_Name__c}} - {{Doc_Date__c}}


{{Category__c}} - {{Date__c}}


{{Category__c}} - {{Date__c}}


{{Test_1__c}} - {{Date2__c}}


Any know of a way to merge all this data together and update a field in SF with it without JS?


I can display all the info easily in 3 different rich text fields. i created 3 models that meet criteria after selected & Saved, so displaying it not an issue


Just need help to concatenate all these 3 fields (in which each can contain data from multiple rows) into 1.


Any help will be greatly appreciated


Thx

I haven’t done this, but could you create a UI only model with a text field, then have an action that updates the value of that field with the current value of the field and the value to add on at the end for all rows in the model?


example:


Model: UIModel


Field: UIField


Action:


Update UIField with:


{{$Model.UIModel.data.0.UIField}} {{DocName}} {{DocDate}}


the initial value of the UIField is blank so the first update it would add {{DocName}} {{DocDate}}. The second update there would be a value in the UIField already, so it would add {{DocName}} {{DockDate}} to the end and so on…


Hey Raymond, thank you, I had thought of that idea and even tried it, the problem was that user has possibility of 'Un-selecting ’ the record if made a mistake. so in this case there’s no way to remove from the list/note if user misclicked… so i’m trying to accomplish this with the 'Next step Button" in the wizard, once they have made and saved their selection


Example below (when yellow = record selected), when record selected, the wrapper in background does 2 actions, update a lookup field and a date field with today’s date. When Un-selected (clicked on it again) the wrapper, clears those fields previously populated when selected.


then the Next Step Button, saves those changes. so in that button would be ideal to ‘Create that note’ as at this point user will not try to add or remove any records when going to next step



Could you make the first step in the action sequence to set the UIField to a blank text string. Then each transaction you would be starting from a bank slate?


But example, let’s say i select record 1 as in screenshot above, action will update UI field, then let’s say i select 2nd record , action will update UI field again, now i just realized i misclicked for 2nd one and click on it again to ‘remove it’, there’s no way for me to remove that in the UI field, without fully clearing it out, and then i lost the note of the 1st record.


Hope it’s clearer


You would probably have to use JavaScript to create a custom formula that allows you to define a string the search the field for that string and remove it.


no code option would be to attach tasks or a custom related object records and then display those in a child relationship field or template. Then the user could open a drawer, slider, or pop up and edit the tasks/children as needed.


Bah that’s what i thought, wanted to stay away from JS as pretty much a noob in it lol


The related list will not work as well, and in that process the same record can be later change to be related to another record, so we would lose the relationship


thank youf or trying 🙂 if by any chance u have a similar JS already written that i can modify it would help a lot


or a JS that can basically list all the rows of multiple models and make a note with it


Thx!


Reply