Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pulling Works Cited from Google Scholar

Featured Replies

  • Newbies

I have a database hosted by FM Server that catalogs a list of my department's projects and publications (with supplemental materials, like PDFs, etc.). The database is web-published via WebDirect and is linked to from our main website so that users can filter, sort, and search our listings.

I would like to be able to pull into our database the number of times a publication has been cited from Google Scholar. Right now, I have a web viewer on the database record for each publication that shows the Google Scholar page for that pub where the information will come from and I have a calculation field that gets the content of the webviewer with this formula where "GoogleScholar1" is the name of the webviewer:

GoogleScholar_web = GetLayoutObjectAttribute ( "GoogleScholar1"; "content")

This field contains text that looks like this (this is just a section):

...... class="gsc_value">The Journal of Early Adolescence</div></div><div class="gs_scl"><div class="gsc_field">Volume</div><div class="gsc_value">32</div></div><div class="gs_scl"><div class="gsc_field">Issue</div><div class="gsc_value">5</div></div><div class="gs_scl"><div class="gsc_field">Pages</div><div class="gsc_value">621-649</div></div><div class="gs_scl"><div class="gsc_field">Publisher</div><div class="gsc_value">SAGE Publications</div></div><div class="gs_scl"><div class="gsc_field">Description</div><div class="gsc_value" id="gsc_descr">Abstract To highlight individual and neighborhood interactions in the risk of adolescent <br>substance use, this study examined the moderating role of neighborhood disadvantage on <br>the relationship between pubertal development and adolescent girls&#39; substance use. <br>Drawing on the contextual amplification hypothesis, it was hypothesized that the effect of <br>pubertal development on substance use would vary by level of neighborhood disadvantage <br>and race. The sample included 5,591 adolescent girls from the National Longitudinal <b> ...</b></div></div><div class="gs_scl"><div class="gsc_field">Total citations</div><div class="gsc_value"><div style="margin-bottom:1em"><a href="https://scholar.google.com/scholar?oi=bibs&amp;hl=en&amp;cites=15750230415528023900&amp;as_sdt=5">Cited by 8</a></div><div id="gsc_graph"><div id="gsc_graph_x"></div><div.......

I need to pull the number that follows the text "cited by". I have tried several different text functions, etc. and nothing has gotten me close to getting this to work. Any ideas would be appreciated. I don't normally have to pull content from a web viewer into a database so this is new to me. Thanks in advance!

 

 

Edited by Deanna Meador

Extracting text from HTML is difficult and frustrating - esp. because the format can change at any moment and break your formula.

Still, in the absence of a viable alternative, try the following formula =

Let ( [
text = GoogleScholar_web ;
prefix = ">Cited by " ;
suffix = "<" ;

start = Position ( text ; prefix ; 1 ; 1 ) + Length ( prefix ) ;
end = Position ( text ; suffix ; start ; 1 )
] ;
Middle ( text ; start ; end - start )
)

Note:

1. This assumes the prefix string ">Cited by " does not appear earlier in the HTML code (you're only showing us a portion of it);

2. I am not sure why you need the GoogleScholar_web calculation field; you could reference the web-viewer directly in the calculation by defining text as:

text = GetLayoutObjectAttribute ( "GoogleScholar1"; "content") ; 

3. Hopefully it's clear you would be using this in a Set Field[] script step, to populate a Number field.

  • Author
  • Newbies

Thanks so much!  This worked like a charm :-)

I got rid of the extra field and incorporated the GetLayoutObjectAttribute piece into the Let function as you suggested.

Your help is greatly appreciated!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.