问题找到第一个空白字段 [英] problem finding first blank field

查看:55
本文介绍了问题找到第一个空白字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含31个问题的表单,每个表单都可能导致申请被拒绝。我有10个名为issue 1 ... issue10的字段。如果发现问题,我想将消息保存到第一个空问题字段。代码如下。问题是它每次都使用两个问题字段。例如,如果问题2存在问题,则将问题消息放在issue1 AND issue2中。如何才能使用第一个可用字段?

I have a form with 31 questions each of which could cause an application to be rejected. I have 10 fields named issue 1...issue10. If a problem is found I want to save a message to the first empty issue field. The code is below. The problem is it uses two issue fields each time. For example if there is a problem with question 2 it puts the issue message in issue1 AND issue2. How can I get it to only use the first available field?

展开 | 选择 | Wrap | 行号

推荐答案

虽然这与你的问题无关我想建议你使用一个简单的函数来测试,而不是手动检查所有值。
although this has nothing to do with your problem I''d like to advice that you use a simple function to test, instead of manually checking all values.
展开 | 选择 | Wrap | 行号


您的代码(虽然可以如所建议的那样改进)应该工作正常。其他一些必须影响它。是否有其他代码设置问题字段值?
Your code (though it could be improved as suggested) should work fine. Something else must be affecting it. Is there any other code which sets the issue field values?


好的。这是我正在使用的。它确实找到了第一个空白字段,名为''issue''+ i。


但是,它在第​​一次出现后再也无法工作了。我需要它做出这个决定,并在每次发现问题时将cNarrative字符串发布到下一个空白''问题'+ i。为了实现这一点,我需要做些什么改变?

Okay. Here is what I am using. It does find the first blank field named ''issue''+i.

However, it never works again after the first time around. I need for it make this determination and post whatever the ''cNarrative'' string is to the next blank ''issue''+i each time it finds a problem. What do I need to change to make this happen?

展开 | 选择 | Wrap | 行号


这篇关于问题找到第一个空白字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆