Jump to content
Macro Express Forums

gagangoomer

Members
  • Posts

    88
  • Joined

  • Last visited

  • Days Won

    1

gagangoomer last won the day on November 21 2013

gagangoomer had the most liked content!

Profile Information

  • Gender
    Male

Recent Profile Visitors

282 profile views

gagangoomer's Achievements

Newbie

Newbie (1/14)

1

Reputation

1

Community Answers

  1. It is in Continuance with what i previously asked . I'm in a healthcare project where some charges needs to be splitted on the basis of the multiple units billed for that day. I need to split the total charges field with the no of units billed for that particular service. This example must give you an idea about what needs to be achieved. Example :If we had $ 385.35 with 3 units 385.35 can be divided by 3 evenly ( meaning you can split 385.35 into 3 equal parts. ) equal part being 128.45. However, If we had 385.35 and 4 units 385.35 cannot be divided by 4 evenly ( meaning you cannot split 385.35 into 4 equal parts) you would have 96.34 + 96.34 + 96.34 + 96.33 all lines cannot be the same. Please let me know if you need any more info.
  2. Thanks for explaining it so well Samrae. I used the logic you mentioned above. However this doesn't solve the issue. Example :If we had $ 385.35 with 3 units 385.35 can be divided by 3 evenly ( meaning you can split 385.35 into 3 equal parts. ) equal part being 128.45. However, If we had 385.35 and 4 units 385.35 cannot be divided by 4 evenly ( meaning you cannot split 385.35 into 4 equal parts) you would have 96.34 + 96.34 + 96.34 + 96.33 all lines cannot be the same. Is there any other way by which we can deal with this issue ?
  3. Thanks Samrae for explaining so well. However i'm new to the ASCII value and haven't used this option before. So not able to understand what you did in the below code. Variable Set to ASCII Char 9 to %TAB% // Initialize TAB Can you explain a bit more about it. Though i tried to get some info from the help but still not clear on this.
  4. Here's the script. Variable Set String %T[90]%: Prompt Variable Set String %T[91]%: Prompt Variable Modify String %T[90]%: Convert to Decimal (%D[1]%) Variable Modify String %T[91]%: Convert to Decimal (%D[2]%) Variable Modify Decimal: %D[3]% = %D[1]% / %D[2]% Variable Modify Decimal: Round %D[3]% to 2 decimal places If Variable %D[3]% Contains "." Text Box Display: Else Text Box Display: End If I want the code to give a message "Evenly Divided" or "Result contaions a decimal". For example : 10 / 2 = 5 which would result first message and 10 / 3 = 3.34 which would result in second message. I've tried with direct values in Integer and Decimal as well(without conversion) but it didn't work as well. I need to follow a different set of steps for both conditions mentioned above. Hope this explanation helps.
  5. Hi, Is there a way to check decimal(.) in a value ? I'm capturing some values from an application and doing some calculation on it. After that i need to check if the final value consist decimal or not. I tried to convert the integer/decimal to string as well but it doesn't retains the value after decimal. Thanks in advance ! Rocki
  6. Hi, I've created a Multiple Choice Menu with 58 options. I've used swtich case along with MCM. It works fine till the user selects till 36th option i.e. all the Alphabets(A-Z) and numbers(0-9). But the issue starts from 37th option onwards where the values are written in AA, BB, CC...ZZ field. It doesn't display any value when printed. Any suggestions on tis wired behaviour ? Here's the command text of the code. Multiple Choice Menu: EOB Code Switch( %EOB_Type% ) Case: A Variable Set String %Den_code% to "B06" End Case Case: B Variable Set String %Den_code% to "B07" End Case Case: C Variable Set String %Den_code% to "B12" End Case Case: D Variable Set String %Den_code% to "B14" End Case Case: E Variable Set String %Den_code% to "B16" End Case Case: F Variable Set String %Den_code% to "B21" End Case Case: G Variable Set String %Den_code% to "B55" End Case Case: H Variable Set String %Den_code% to "B94" End Case Case: I Variable Set String %Den_code% to "BB9" End Case Case: J Variable Set String %Den_code% to "BG8" End Case Case: K Variable Set String %Den_code% to "BJ1" End Case Case: L Variable Set String %Den_code% to "BC1" End Case Case: M Variable Set String %Den_code% to "BGI" End Case Case: N Variable Set String %Den_code% to "BX3" End Case Case: O Variable Set String %Den_code% to "J33" End Case Case: P Variable Set String %Den_code% to "J60" End Case Case: Q Variable Set String %Den_code% to "J95" End Case Case: R Variable Set String %Den_code% to "J97" End Case Case: S Variable Set String %Den_code% to "J99" End Case Case: T Variable Set String %Den_code% to "K00" End Case Case: U Variable Set String %Den_code% to "K05" End Case Case: V Variable Set String %Den_code% to "K06" End Case Case: W Variable Set String %Den_code% to "K14" End Case Case: X Variable Set String %Den_code% to "K16" End Case Case: Y Variable Set String %Den_code% to "K18" End Case Case: Z Variable Set String %Den_code% to "K23" End Case Case: 0 Variable Set String %Den_code% to "K27" End Case Case: 1 Variable Set String %Den_code% to "K29" End Case Case: 2 Variable Set String %Den_code% to "K33" End Case Case: 3 Variable Set String %Den_code% to "K34" End Case Case: 4 Variable Set String %Den_code% to "K36" End Case Case: 5 Variable Set String %Den_code% to "K37" End Case Case: 6 Variable Set String %Den_code% to "K44" End Case Case: 7 Variable Set String %Den_code% to "K45" End Case Case: 8 Variable Set String %Den_code% to "K46" End Case Case: 9 Variable Set String %Den_code% to "K48" End Case Case: AA Variable Set String %Den_code% to "K49" End Case Case: BB Variable Set String %Den_code% to "K52" End Case Case: CC Variable Set String %Den_code% to "K57" End Case Case: DD Variable Set String %Den_code% to "K58" End Case Case: EE Variable Set String %Den_code% to "K59" End Case Case: FF Variable Set String %Den_code% to "K60" End Case Case: GG Variable Set String %Den_code% to "K62" End Case Case: HH Variable Set String %Den_code% to "K74" End Case Case: II Variable Set String %Den_code% to "K75" End Case Case: JJ Variable Set String %Den_code% to "K76" End Case Case: KK Variable Set String %Den_code% to "K78" End Case Case: LL Variable Set String %Den_code% to "K82" End Case Case: MM Variable Set String %Den_code% to "K89" End Case Case: NN Variable Set String %Den_code% to "K95" End Case Case: OO Variable Set String %Den_code% to "KA2" End Case Case: PP Variable Set String %Den_code% to "KBA" End Case Case: QQ Variable Set String %Den_code% to "KBD" End Case Case: RR Variable Set String %Den_code% to "KBF" End Case Case: SS Variable Set String %Den_code% to "KBM" End Case Case: TT Variable Set String %Den_code% to "KBX" End Case Case: UU Variable Set String %Den_code% to "KC0" End Case Case: VV Variable Set String %Den_code%: Prompt End Case End Switch Text Box Display: %EOB_Type% Default Case
  7. Double checked the Varibale. It is defiened as an array variable still giving the same error message. I tried to copy the code as you mentioned above but it gets copied as text type and not the macro script...not sure why it is acting so wired.
  8. I tried the steps you mentioned above, but still its not working for me....Can you please send me the macro you created for me ? I tried a lot of options but none is working for me.
  9. Thanks Duchi, But i'm getting the below error message (screenshot attached) from the above code.
  10. Thanks Duchi.. I ran the above code of lines but didn't get any output. The prompt takes the value but i'm not able to print it. Also how will i get to know the length of array so that i can print a particular value from the array. Note : Please use the Copy Command Text option by selecting the code and right clicking on it. By this way the script can be copied easily by anyone and paste in their MEP as a script instead of text.. Variable Set Integer %array_number% to 1 Repeat Start (Repeat 100 times) Variable Set Integer %number%: Prompt If Variable %number% Equals "0" MessageBox: Test Repeat Exit End If Variable Set Integer %new_number[%array_number%]% to %number% Variable Modify Integer %array_number%: Increment MessageBox: Result End Repeat or can send me the macro on rocki_thegreat@yahoo.com
  11. Here's the requirement along with the snippet. Input box to accept value from user till user enter 0 to exit the loop. The code will check if value >0 then store it in a Array variable. I’m not sure once the value is stored in an array how to display those values. Below is the snippet of the code for your reference :- Variable Set Integer %N[1]%: Prompt // How many times the loop will run Variable Set Integer %N[2]% to 1 // Initialize If Variable %N[1]% Is Greater Than "0" Repeat Start (Repeat %N[1]% times) Variable Set Integer %Line_No[%N[2]%]%: Prompt // Store value in Array Variable If Variable %Line_No[%N[2]%]% Does not Equal "0" Text Box Display: Variable Modify Integer %N[2]%: Increment End Repeat Text Box Display: Else MessageBox: Incorrect Value End If Input box to accept value from user till user enter 0 to exit the loop. The code will check if value >0 then store it in a Array variable. I’m not sure once the value is stored in an array how to display those values. Below is the snippet of the code for your reference :- Variable Set Integer %N[1]%: Prompt // How many times the loop will run Variable Set Integer %N[2]% to 1 // Initialize If Variable %N[1]% Is Greater Than "0" Repeat Start (Repeat %N[1]% times) Variable Set Integer %Line_No[%N[2]%]%: Prompt // Store value in Array Variable If Variable %Line_No[%N[2]%]% Does not Equal "0" Text Box Display: Variable Modify Integer %N[2]%: Increment End Repeat Text Box Display: Else MessageBox: Incorrect Value End If
  12. Thanks Duchi, Do you have a small example for array which you would like to share ?
  13. how to capture values in a variable till the user enter "0". and ow to display those values ?
  14. Thanks Cory, Could you please share an example of array's in variables with me ?
×
×
  • Create New...