• Resolved Mohsen

    (@msedighiyan86)


    Hello

    Thanks for your great plugin.

    How can I summarize this code?

    (function(){
    if(fieldname505==1 )
    {
    return (function() {var result = 1; getField(fieldname524|n).setVal(result); return result;})(); }
    if(fieldname505==2 )
    {
    return (function() {var result = 2; getField(fieldname524|n).setVal(result); return result;})(); }
    if(fieldname505==3 )
    {
    return (function() {var result = 3; getField(fieldname524|n).setVal(result); return result;})(); }
    ....
    ....
    ....
    if(fieldname505==20 )
    {
    return (function() {var result = 20; getField(fieldname524|n).setVal(result); return result;})(); }
    })()
    • This topic was modified 4 months ago by Mohsen.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @msedighiyan86

    Thank you very much for using our plugin. Your equation can be implemented as follows:

    (function(){
    getField(fieldname524|n).setVal(fieldname505);
    return fieldname505;
    })()

    Best regards.

    Thread Starter Mohsen

    (@msedighiyan86)

    Thanks…

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.