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.

I need to do a report that pulls data when two fields =

Featured Replies

   I have a database that was imported from an Excel spreadsheet.   It has rows of repetitive data in it.   
I simply need to do some query searches in it to pull the data out.    Users where asked questions, and obviously there are answers.
Each question has a unique label on it 😀, and each user has a unique ID Number😀!

So my question(s) is,  how do I get both fields, QUESTION_ID    and   RN_NUMBER to both come up to show me the question and answer?

 

Do I create a script that has in "IF" statement and then another "IF" statement inside of that ?? 

 

Screen Shot 2019-10-31 at 9.15.29 AM.png

Screen Shot 2019-10-31 at 9.14.47 AM.png

Screen Shot 2019-10-31 at 7.59.31 AM.png

  • Author

Can you use & when doing and IF statement?

 

  If WorkForceData::Gender = "Male" & WorkforceData::Question_ID = "Q-000631"

  • Author

If [WorkForceData::Gender = "Male" and WorkForceData::Quesiton_ID = "Q-000631"] $Male + 1

 

^^ Could that work, $Male of course being a variable.

I am going to give this a try 🙂523948243_ScreenShot2019-10-31at10_24_20AM.thumb.png.3c7dc4418c0e95c50e3130e84bf3d8d9.png

I don't know. You started this thread by asking about doing a find for a report. At least I think you did - I did not understand the question that well. Now you're showing something that could be part of a script or a calculation (but isn't either), with no context and no explanation what it's supposed to do, and you ask if it could work. I don't know.

 

  • Author

It is supposed to go through that WordForceData table and count how many times when 
the field Gender = Male and the field Question_ID =q-000631

WorkForceData::Gender = "Male" and WorkForceData::Quesiton_ID = "Q-000631"

 

I just ran it and It looks like it is locked up, won't stop running.

Re the script you added: it might work if instead of going to the last record, you go to the next record, with the option 'Exit after last' turned 'On'. And I think you want to start with the counters at 0, not 1.

There's probably a better way to do this, but ... 

  • Author

?? Thanks for your help first of all!!!  But could you please be more precise? Remember, I am a rookie,   🙂 .  I don't see where it says to go to the last record, and where I would put "Exit after Last" turned on ??? .  SORRY, could you give example, or tell me where to put that?? I am google searching now..

 

  • Author

Ok, I did that, and thanks for clarifying it by the way!!, and nothing is popping up.

I was hoping to click the button, run the script, and it would count the numbers for me of how many males and females we have. the $males and $Females total.   

Could I make $males and $females global and just show their numbers?? 😉

 

Well, you need to do something with the variables after the loop has finished running. Like set a field with them, or show them in a custom dialog. Once the script has run out, they are erased from the board.

  • Author

So I did some googling and found the "Set Field" command.   I am trying to push the numbers from the global variables over to the set field areas.    Not quite working yet.   I put them at the bottom of the script.

 

 

Screen Shot 2019-10-31 at 12.15.28 PM.png

When I click on my shortcut block to execute the script I get a strange square like icon that pops up, and nothing happens.  I have a Macintosh machine, I don't know if that is supposed to be like an hourglass or what, but I seem to get nothing. 😡

 

I tried to capture how it looks, but I obviously can't.  I feel like I am so close to getting the ******* count of how many Male and Females there is.  After that, boom it opens up the door for me to understand how to do all of these ******* queries!

Screen Shot 2019-10-31 at 12.26.32 PM.png

Create an account or sign in to comment

Important Information

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

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.