Key Word Automation

Viewing 2 reply threads
  • Author
    Posts
  • June 11, 2019 at 2:29 AM #35050

    Kimberley Hoffman
    Participant

    Hi Brendan,
    I was wondering if there is a simple calculation to insert ‘_’ between individual words to form a keyword/hashtag that I can just copy and paste.

    The attached shows how I have it now. I have to insert the _ while typing. Is there a way to insert it automatically into the hashtag line? I want to use keywords without the _ and if I am using hashtags, they need to be in there.

    Could you give me a hint, please? Thanks.
    Regards,
    Kimberley

    Attachments:
    You must be logged in to view attached files.
    June 12, 2019 at 1:50 AM #35057

    Brendan
    Keymaster

    So you want all the spaces to be replaced with underscores within the value of a field? Is that what you’re wanting?

    If so, you can use a Script field with the following script:

    function Hash_Tag() {
    
    	var keyword = record.getFieldValue('fld-6ec7c1fdcc094a1c8d935b36158cb0a8');
    	var hashTag = "#" + keyword.split(' ').join('_');
    
    	return hashTag;
    }
    
    Hash_Tag();

    Replace the fld-... bit with the field ID from your own Keyword field.

    Attachments:
    You must be logged in to view attached files.
    June 13, 2019 at 12:02 PM #35068

    Kimberley Hoffman
    Participant

    Thank you, Brendan.
    This is very helpful, as I need to use the keywords on my website and the hashtags in social media posts. I will upload the editorial plan soon.
    Have a great evening!
    Regards,
    Kimberley

Viewing 2 reply threads

You must be logged in to reply to this topic.